public class AccessController extends Object
Constructor and Description |
---|
AccessController() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isKillAllowed(String cliUser,
String resource)
Checks whether the CLI user (no subject) us allowed to kill tge run.
|
static boolean |
isKillAllowed(Subject user,
String resource)
Checks whether the user is allowed to kill the run.
|
static boolean |
isManageAllowed(Subject user)
Checks whether the user is allowed to manage at least one benchmark.
|
static boolean |
isManageAllowed(Subject user,
String resource)
Checks whether the user is allowed to manage the given benchmark.
|
static boolean |
isRigManageAllowed(Subject user)
Checks whether the user is allowed to manage the rig, such as
stopping or restarting run queues.
|
static boolean |
isSubmitAllowed(Subject user)
Checks whether the user can submit runs in at least one of the deployed
benchmarks.
|
static boolean |
isSubmitAllowed(Subject user,
String resource)
Checks whether the user can submit runs for the given benchmark.
|
static boolean |
isViewAllowed(Subject user)
Checks whether the user can view at least one run result.
|
static boolean |
isViewAllowed(Subject user,
String resource)
Checks whether the user can view the given run result.
|
static boolean |
isWriteAllowed(Subject user)
Checks whether the user is allowed to add comments to at least one run.
|
static boolean |
isWriteAllowed(Subject user,
String resource)
Checks whether the user is allowed to add comments on the given run.
|
public static boolean isSubmitAllowed(Subject user)
user
- The user in questionpublic static boolean isSubmitAllowed(Subject user, String resource)
user
- The user in questionresource
- The benchmark short namepublic static boolean isViewAllowed(Subject user)
user
- The user in questionpublic static boolean isViewAllowed(Subject user, String resource)
user
- The user in questionresource
- The run id of the runpublic static boolean isRigManageAllowed(Subject user)
user
- The user in questionpublic static boolean isManageAllowed(Subject user)
user
- The user in questionpublic static boolean isManageAllowed(Subject user, String resource)
user
- The user in questionresource
- The short name of the benchmarkpublic static boolean isWriteAllowed(Subject user)
user
- The user in questionpublic static boolean isWriteAllowed(Subject user, String resource)
user
- The user in questionresource
- The run id of the runpublic static boolean isKillAllowed(Subject user, String resource)
user
- The user in questionresource
- The run id of the run in the queue