GrantAccess and RevokeAccess functions

Aug 30, 2012 at 7:38 PM

Hello,

I need to give temporary access to the logged user to create an entity record (i.e.: create a new contact based on certain information entered). At the same time, we I don't want the users having access to the Contacts entity all the time.

We already create a plugin (C#) that does that, but now we need to do it in JS, because the contact record needs to be created before the plugin for that entity gets fired.

We already have a systemuser we used in the plugin (superuser)

I was trying to use the GrantAccess and RevokeAccess functions introduced in 1.1 version, but it seems they are not doing what we are expecting (or maybe those functions are not meant for that).

Could you provide some samples of how to use those two functions?

Thanks

Coordinator
Aug 31, 2012 at 8:30 AM

Hi.

GrantAccess and RevokeAccess have the same rule and how they should be used as described in the SDK.

Contains the data that is needed to grant a security principal (user or team) access to the specified record. 

Therefore, you need a specified record to use the methods. The examples could be found in aspx page under source code.

Your scenario bascially talking about create privilege not access if that make sense. As for now, i could not really recomment how you could do this in JS and i personally will not do ths in JS as well from security and complexity point of view.

May do a bit search and see what others will suggest.

Jaimie

 

 

Aug 31, 2012 at 2:05 PM

Thanks Jaimie for your quick response.

I see, it's used to assing permissions to an existing record; not to the entity... And yes, it's more a Privilege related issue.

I'll keep using the Plugin (C#) instead...

Thanks you again for the library, it's very useful.