SAL-371 Introduce PermissionEnforcer

Merged
#118 · Created  · Last updated

Merged pull request

Merged in SAL-371-permission-enforcer (pull request #118)

4d364e4·Author: ·Closed by: ·2018-03-27

Description

Introduces PermissionEnforcer, which can be used by plugins to verify that the caller has sufficient permissions. The enforceXyz methods throw an AuthorisationException if the caller does not have the required permissions.

Host applications are expected to configure exception handling in such a way that

  • unauthenticated web requests are redirected to the login page

  • authenticated web requests where the user has insuffcient permissions are redirected to an appropriate error page.

  • REST requests return a 401 response if an AuthorisationException is thrown.

 

Examples of usage:

0 attachments

0 comments

Loading commits...