I have a requirement like I need to add temporary roles to the user (hope we have to try it on loggingin or loggedin pipeline) and the roles should not be persisted to the security database against the user. The Roles should only be persisted as long as the user is logged in. When the user logs out, or his session expires, the modifications(assigned Roles) should be lost.

Hope it is possible in Sitecore 5.x and modifications can be performed on a UserItem object before logging in and It should not be persisted to the security database. Detail can be found in the below post https://doc.sitecore.com/SdnArchive/Articles/Security/Faking%20user%20roles.html

After 5.x the Security Module is completely revamped I think where I could not find UserItem object and also I haven’t found any relevant method in UserRuntimeSettings class as well, so how can I achieve the desired functionality or only I have to store the roles against the user in the DB and delete them when needed.

Please Advise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.