Permission Error on the View Page for a User

Posted by IramK on 04-Jun-2015 03:14

Hello,

I am using a formula field for a field that sets the days gone past a particular date. This field works all fine when I am logged in as an Administrator, however when I login as a user I get the following error:

ERROR: Error Wrapped p5.a585: Permission denied for both current User and Server API role (line #7)


Could someone point me in the right direction as to what permissions I need to enable for a "User" so that the API I use will work in all cases? Kindly let me know.

Cheers

All Replies

Posted by Mani Kumar on 04-Jun-2015 03:24

Hi Iram,

It looks like the "Server API" role, doesn't have the "Edit" permissions on this component.

Can you please check if proper access is enabled for the above role by navigating thru :

"Setup > Administration Setup > Roles > Server API> Permissions"

For more information on this, please refer to below documentation URL :

documentation.progress.com/.../index.html

Regards,

Mani.

Posted by IramK on 04-Jun-2015 04:18


Hello [mention:ce2116fd258e46ee8b4509379c9663a4:e9ed411860ed4f2ba0265705b8793d05] ,

I have been successfully able to achieve one of the tasks related to Server API, however I still am not able to use rbf_selectQuery(...) API on the user. I basically have the user "loginName" field value and I am trying to get its ID.

rbf_selectQuery("select id from user where loginName=" + getUserID, 1, function callback(values)
{
alert(values[0][0]);
});

Kindly let me know.

Cheers.
Posted by pvorobie on 04-Jun-2015 12:09

Do you mean ID of current user? Just use template token for that.

Posted by IramK on 05-Jun-2015 03:49

Hello [mention:05b5f00eae4a468d844fa8bedcafd110:e9ed411860ed4f2ba0265705b8793d05] , is there no way I could access it using a selectQuery like I did above? I would like to use it like that if possible please.

Posted by pvorobie on 05-Jun-2015 11:28

You certainly can use AJAX API rbf_selectQuery. For that current user must have VIEW permissions for all records for requested Object, in your case, USER.

Please note that Object integration names are case-sensitive, so you should use "USER" instead of "user" in your query.

Posted by IramK on 05-Jun-2015 11:45

Ok I'm trying to do the same and I am unable to get any response. There are no values returned from the selectQuery unfortunately. I have set VIEW permissions for all records on USER and also changed the object integration name to USER in my selectQuery. Any other suggestions on why it wouldn't run for a user?

Posted by pvorobie on 05-Jun-2015 11:53

If no value is returned and no error is thrown, I suggest to check that query parameter is valid. Also, since you're building your query dynamically, please add single quotes around your parameter.

I recommend you use "Test Query" button to debug your query.

Posted by IramK on 08-Jun-2015 05:29

Ok I found an issue with why it wasn't giving me a response. Basically my USER object has LDF permissions on it and when I try to run the selectQuery, it doesn't return back with any result. If I deselect the LDF permissions, I get a proper response back. I don't understand why there should be a relation between LDF permissions, USER object and Query API. Can anyone explain to me please with a possible solution?

Cheers.

Posted by pvorobie on 08-Jun-2015 11:16

USER object by default has LDF permissions. You can remove these permissions by removing "Organization" attribute. This may be a good idea if you're not using LDF.

Posted by IramK on 09-Jun-2015 03:08

I would like to use LDF with the USER object. Could you suggest a solution where I can use LDF permissions with Query API access enabled?

Cheers.

Posted by pvorobie on 09-Jun-2015 08:32

My understanding is that you are using LDF permissions: USER records outside available LDF scope are hidden.

Posted by IramK on 15-Jun-2015 08:36

Sorry I didn't get that. Does that mean I cannot access a USER object record with LDF permissions on it?

Posted by pvorobie on 15-Jun-2015 10:25

You can - if you have LDF permissions. It seems that you do not have LDF permissions.

Posted by IramK on 16-Jun-2015 04:29

How can I enable LDF permissions? Do I have to create a group and then allow access for that particular user record? Or can I do it for users with a "User" role as a whole?

Posted by Chandrasekhar Gontla on 16-Jun-2015 04:32

Hi,

Please follow the steps in the below link to configure LDF.

documentation.progress.com/.../index.html

Thanks and Regards,

Chandra.G

Posted by IramK on 16-Jun-2015 08:08

HI, Looks like there is a confusion. We don''t want to allow everyone to access the User object, but only the Server API should have access to view this object as we are doing an ajax call to fetch details from the User object.

When the LDF permissions are disabled in the User object this works fine as the Server API role has access to the USer Object. However when LDF permissions are enabled, the Server API role is unable to access the USER Object and we receive the above error message. How can we enable the Server API to have access to the USer object while LDF permissions are enabled on the User Object?

Hope this is clear.

Posted by pvorobie on 16-Jun-2015 11:44

Query API applies LDF permissions first, so Server API permissions do not have effect in this case.

This thread is closed