- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 74
Open
Labels
triageScreening required.Screening required.
Description
Currently the IWopiSecurityHandler defines this method (only used when building CheckFileInfo):
Task<WopiUserPermissions> GetUserPermissions(ClaimsPrincipal principal, IWopiFile file, CancellationToken cancellationToken = default);
Yet when building CheckContainerInfo we (I) used the "new" attribute-based security which actually uses this method:
Task<bool> IsAuthorized(ClaimsPrincipal principal, IWopiAuthorizationRequirement requirement, CancellationToken cancellationToken = default);
Consolidation options:
- we rename WopiUserPermissions to WopiFilePermissions and create a parallel WopiContainerPermissions and the appropriat GetContainerPermissions() method in IWopiSecurityHandler; we leave the current Permissions as basic rights only for the attribute-security (since WopiContainerPermission has e.g. no Read right)
- we let the OnCheckFileInfo/OnCheckContainerInfo event handlers worry about that - in that case we wont need any WopiUserPermissions nor methods in IWopiSecurityHandler and keep the basic Permission object and current checks (which are handled anyway by IWopiSecurityHandler.IsAuthorized)
- combining all in one Permissions object might be confusing so I would not do that
I am personally voting for number 1 - clear, concise and separate - unless you have any other suggestions...
@petrsvihlik What do you think?
Metadata
Metadata
Assignees
Labels
triageScreening required.Screening required.