I have a scenario that I need to change some fields of an entity which user doesn't have access at all. I'd like to know if there is some way to in the moment that my plugin business logic is running I increment to the calling user permission the permission to update the entity and after that I take it out from him.
Access Right Employee: has no acces upon Account at all (Bryan's current Access Right). Access Right Manager: has access to update Account.
Scenario: Every time "Bryan" creates an opportunity runs a plugin on create of it that increment in one a field named new_count
in the whole accounts of the system. (I know this cenario is stupid without any sense, but anyway). So we put a plugin on create of the lead. Bryan creates a lead, in plugin I add his Access Rights with Manager just to run the plugin, after the update I take it away from him.
was I clear? If so, I'm hoping for an answer!
Thanks