3

I am modifying the existing javascript for the SelectRoles modal window, and I would like to add a piece of code to check if the current user has the "Is Administrator" checkbox checked. I need to find out who the current user is and if they have that setting checked.

We are moving towards domain administrators managing their own domain users, but we are not giving them the "Is Administrator" checkbox or the ability to use it. This would allow us to have a general rule on the way roles are assigned, but have select admins override those rules in fringe cases.

1
  • I think wel need more info with some example code of what your trying to do here to help Commented Sep 19, 2017 at 22:52

1 Answer 1

0

The solution I came up with was to modify the SelectRoles xaml to include a hidden field for IsAdmin, and to check that field while applying the rules I needed to implement. I then wrote a class extending the SelectRoles.SelectRolesPage class that assigns the value of the hidden field on load.

The result is now whenever a user opens the Select Roles window, a flag is set whether they are Administrators (according to the IsAdministrator Sitecore value, not any role), and based on that certain rules are applied/ignored.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.