Class Permit
java.lang.Object
uk.ac.manchester.spinnaker.alloc.security.Permit
Encodes what a user is permitted to do. Abstracts over several types of
 security context.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionPermit(jakarta.ws.rs.core.SecurityContext context) Build a permit.Build a permit for a service user.Permit(SecurityContext context) Build a permit.Permit(WebSocketSession session) The permit used for web socket handling.
- 
Method Summary
- 
Field Details- 
adminpublic final boolean adminIs the user an admin?
- 
nmpiexecpublic final boolean nmpiexecIs the user an nmpi exec user?
- 
nameWhat is the name of the user?
 
- 
- 
Constructor Details- 
Permitpublic Permit(jakarta.ws.rs.core.SecurityContext context) Build a permit.- Parameters:
- context- The originating security context.
 
- 
PermitBuild a permit.- Parameters:
- context- The originating security context.
 
- 
PermitBuild a permit for a service user. The service user can create jobs and read job details, but cannot do much with jobs owned by other users. Only used by the legacy interface.- Parameters:
- serviceUser- The user name. Must exist in order to be actually used.
 
- 
PermitThe permit used for web socket handling. Note that websockets never have access to admin facilities (and shouldn't ever need them), even if their creating user does.- Parameters:
- session- The originating websocket context.
 
 
- 
- 
Method Details- 
unveilForCan something owned by a given user can be shown to the user that this permit is for?- Parameters:
- owner- The owner of the object.
- Returns:
- True exactly if the object (or subset of properties) may be shown.
 
- 
authorizePush our special temporary authentication object for the duration of the inner code. Used to satisfy Spring method security.- Type Parameters:
- T- The type of the result
- Parameters:
- inContext- The inner code to run with an authentication object applied.
- Returns:
- Whatever the inner code returns
 
 
-