Alex O'Ree created JSPWIKI-1388:
-----------------------------------
Summary: Need an API or utility to determine if a given user
principle is a system admin or not
Key: JSPWIKI-1388
URL: https://issues.apache.org/jira/browse/JSPWIKI-1388
Project: JSPWiki
Issue Type: New Feature
Reporter: Alex O'Ree
we need a way to determine if a given user principle is an admin outside the
scope of their http session/http request.
i.e. i'm signed in as bob and i want to known if mary has system admin
permission
the best we have this.
Context wikiContext = Wiki.context().create(engine, request,
ContextEnum.WIKI_ADMIN.getRequestContext());
if
(!engine.getManager(AuthorizationManager.class).hasAccess(wikiContext,
response)) {
}
but that requires the context of a http request which i presume has to belong
to that user (mary in the example)
this would be scoped to jspwiki managed authentication only. keycloak,
container and other filter based auth is a bit out of scope for this (and way
harder)
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)