Same as Users, Teams can be used to assign roles. This is used mostly for Owner Teams, which should have the right privileges over the records that they own. Find below a method to assign roles to a Team
Sometimes we need to manage roles programmatically with plugins to fulfill our customer requirements. This is great to allow Users to see data and append privileges. Find below a method that will assign a role to a user(Both sent as parameters).
Today I had to build a method to retrieve a Security Role based on its name and I would like to share it so hopefully it can help anyone. LINQ is used to do the actual search.
As variant to a recent post I did, here's another plugin to manage the Activation/Deactivation of records. In this post, I'll describe a plugin that will control these actions in Contact Entity by only allowing users with an specific role. Plugin step details: Message: Update Filtering Attributes: statecode Run in user’s context: Calling User Event … Continue reading Plugin to only allow users with certain role to deactivate records
Find below a C# method to check if an specified user(Sent as parameter) has System Admin role. The method will return true if so. Otherwise, it will return false. Hope it helps.