/** * Short for {@code getACL().checkPermission(p)} */ public void checkPermission(Permission p) { getACL().checkPermission(p); }
/** * Short for {@code getACL().hasPermission(p)} */ public boolean hasPermission(Permission p) { return getACL().hasPermission(p); }
/** * Returns the root {@link ACL}. * * @see AuthorizationStrategy#getRootACL() */ @Override public ACL getACL() { return getSecurityManager().getACL(); }
@Override public ACL getACL() { return HudsonSecurityEntitiesHolder.getHudsonSecurityManager().getACL(); }
/** * Checks if the current user (for which we are processing the current * request) has the admin access. * * @deprecated since 2007-12-18. This method is deprecated when Hudson moved * from simple Unix root-like model of "admin gets to do everything, and * others don't have any privilege" to more complex {@link ACL} and * {@link Permission} based scheme. * * <p> * For a quick migration, use * {@code Hudson.getInstance().getACL().hasPermission(Hudson.ADMINISTER)} To * check if the user has the 'administer' role in Hudson. * * <p> * But ideally, your plugin should first identify a suitable * {@link Permission} (or create one, if appropriate), then identify a * suitable {@link AccessControlled} object to check its permission against. */ public static boolean isAdmin() { return HudsonSecurityEntitiesHolder.getHudsonSecurityManager().getACL().hasPermission(ADMINISTER); }