If you have a folder containing components that a user has only Read permission on, is it possible to roll your own authorisation logic in the event system so that you could allow a user to actually edit a component when they opened it?
So if you subscribe to LoadEventArgs and SaveEventArgs in the Initiated phase for a Component, do your custom authorisation and then update a Components ApplicableActions to include the Edit action, would that work?
comp.ApplicableActions.SetAction("Edit", true)
UPDATE
I installed a small piece of event system code and set up a folder to give only the Read permission to a user:
private void ComponentLoad(Component subject, LoadEventArgs e, EventPhases phase)
{
Logger.Write("ComponentLoad", subject.Id.ToString(), LoggingCategory.General);
using (var elavated = new ElevatedPrivilegesScope(subject.Session, Privileges.SysAdmin))
{
Logger.Write("ComponentLoad ElevatedPrivilegesScope", subject.Id.ToString(), LoggingCategory.General);
subject.ApplicableActions.SetAction("Edit", true);
}
}
I can see that ComponentLoad gets hit quite a few times (which I've read before is to be expected) - but when the component is loaded, the GUI still shows a read-only interface, not en editable one.
Cheers