/** * If this {@link SecurityRealm} supports a look up of {@link GroupDetails} by their names, override this method * to provide the look up. * <p> * This information, when available, can be used by {@link AuthorizationStrategy}s to improve the UI and * error diagnostics for the user. * * @param groupname the name of the group to fetch * @param fetchMembers if {@code true} then try and fetch the members of the group if it exists. Trying does not * imply that the members will be fetched and {@link hudson.security.GroupDetails#getMembers()} * may still return {@code null} * @throws UserMayOrMayNotExistException if no conclusive result could be determined regarding the group existence. * @throws UsernameNotFoundException if the group does not exist. * @throws DataAccessException if the backing security realm could not be connected to. * @since 1.549 */ public GroupDetails loadGroupByGroupname(String groupname, boolean fetchMembers) throws UsernameNotFoundException, DataAccessException { return loadGroupByGroupname(groupname); }
public GroupDetails superLoadGroupByGroupname(String groupname) throws UsernameNotFoundException, DataAccessException { return super.loadGroupByGroupname(groupname); }
/** * If this {@link SecurityRealm} supports a look up of {@link GroupDetails} by their names, override this method * to provide the look up. * <p> * This information, when available, can be used by {@link AuthorizationStrategy}s to improve the UI and * error diagnostics for the user. * * @param groupname the name of the group to fetch * @param fetchMembers if {@code true} then try and fetch the members of the group if it exists. Trying does not * imply that the members will be fetched and {@link hudson.security.GroupDetails#getMembers()} * may still return {@code null} * @throws UserMayOrMayNotExistException if no conclusive result could be determined regarding the group existence. * @throws UsernameNotFoundException if the group does not exist. * @throws DataAccessException if the backing security realm could not be connected to. * @since 1.549 */ public GroupDetails loadGroupByGroupname(String groupname, boolean fetchMembers) throws UsernameNotFoundException, DataAccessException { return loadGroupByGroupname(groupname); }
@Override public GroupDetails loadGroupByGroupname(String groupname) throws UsernameNotFoundException, DataAccessException { initPython(); if (pexec.isImplemented(12)) { return (GroupDetails) pexec.execPython("load_group_by_groupname", groupname); } else { return super.loadGroupByGroupname(groupname); } }
private static int getUserType(String sid) { SecurityRealm sr = HudsonSecurityEntitiesHolder.getHudsonSecurityManager().getSecurityRealm(); // system reserved group if (sid.equals("authenticated")) { return SID_GROUP; } try { sr.loadUserByUsername(sid); return SID_USER; } catch (UserMayOrMayNotExistException e) { return SID_UNKNOWN; } catch (UsernameNotFoundException e) { // fall through next } catch (DataAccessException e) { // fall through next } try { sr.loadGroupByGroupname(sid); return SID_GROUP; } catch (UserMayOrMayNotExistException e) { // undecidable, meaning the group may exist return SID_UNKNOWN; } catch (UsernameNotFoundException e) { // fall through next } catch (DataAccessException e) { // fall through next } return SID_INVALID; }
sr.loadGroupByGroupname(v); return FormValidation.respond(Kind.OK, makeImg("user.gif") +ev); } catch (UserMayOrMayNotExistException e) {
sr.loadGroupByGroupname(v); return FormValidation.respond(Kind.OK, makeImg("user.png") +ev); } catch (UserMayOrMayNotExistException e) {
sr.loadGroupByGroupname(v); return FormValidation.respond(Kind.OK, makeImg("user.png") + ev); } catch (UserMayOrMayNotExistException e) {
sr.loadGroupByGroupname(v); return FormValidation.respond(Kind.OK, makeImg("user.gif") +ev); } catch (UserMayOrMayNotExistException e) {