Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: September 29, 2020 - 5:47 am UTC

Last updated: October 01, 2020 - 1:09 am UTC

Version: 20.1

Viewed 1000+ times

You Asked

Hey!
I have a number of permissions in the app that I can give users,
One of the permissions is a manager - and I want to give it a different access to some of the functions in the app.

I wanted to ask, how can a dynamic action process hide an item by role?

For example: I want to hide a field from someone who is not a manager.
I guess I need to check the role after login process but I thought maybe there is something ready that checks me:
What is the role of the user who is now connected to the app?

and Connor said...

Assuming this is something that is defined by the user's login credentials in some way, you can create an authorisation scheme to defines whether someone has the appropriate role or not.

For example, here in AskTOM, when you sign-on, we have an authorisation scheme which checks to see if you are a regular user of AskTOM or an administrator. This controls what pages we can see, what items on those pages we can see etc.

Once you've defined you authorisation scheme, you attach it to a page/region/item etc via the "Security" property for that component.


Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, September 30, 2020 - 5:23 am UTC

Yes I know that
I'll give you an example and maybe it will explain better
I have a table of comments, comments written about customers ...
I want everyone to be able to create a new comment and see the comments but I do not want them to edit the comments.
In the table, there is a pencil that allows editing of the record - I want to hide it for those who do not manage.
Think this is possible with the existing capabilities of apex?
Connor McDonald
October 01, 2020 - 1:09 am UTC

A condition/authorization should work just fine.

You would leave the "create" button in place so *everyone* can create, but set a condition on the edit link so that its only present for managers

More to Explore

APEX

Keep your APEX skills fresh by attending their regular Office Hours sessions.