Set the authorized state.  Setting authorized to false will override any call
to {@link #setEnabled(boolean)}.  As long as this object is unauthorized,
it can not be enabled.
@param authorized Pass <code>true</code> if the object is to be authorized
977155
public void setAuthorized( boolean authorized ) {

        if( isAuthorized() != authorized ) {

            this.authorized = authorized;

            // We need to apply a change to our enabled state depending on our
            // new authorized state.
            if( authorized ) {
                // install the last requested enabled state
                setEnabled(maskedEnabledState);
            } else {
                // Record the current enabled state and then disable
                maskedEnabledState = isEnabled();
                internalSetEnabled(false);
            }
        }
    }
339669
public void setAccept(List<String> accepts) {
        this.accepts = Collections.unmodifiableList(accepts);
        setHeaders(Collections.singletonMap("accept", this.accepts));
    }
619409
public void setEnabled(String enabled) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_enabled = Boolean.valueOf(enabled).booleanValue();
    }
899374
public void setAveragingEnabled(final boolean ENABLED) {
        if (null == averagingEnabled) {
            _averagingEnabled = ENABLED;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            averagingEnabled.set(ENABLED);
        }
    }
706913
public void setEnabled(boolean isEnabled) {
        mCardNumberEditText.setEnabled(isEnabled);
        mExpiryDateEditText.setEnabled(isEnabled);
        mCvcNumberEditText.setEnabled(isEnabled);
    }
394851
public static void setPassword(final String password) {
        if (password == null) {
            throw new AuthenticationException("Password can not be null");
        }

        if (!password.equals(Twilio.password)) {
            Twilio.invalidate();
        }

        Twilio.password = password;
    }
144151
public void setAuthorizers(java.util.Collection<AuthorizerSummary> authorizers) {
        if (authorizers == null) {
            this.authorizers = null;
            return;
        }

        this.authorizers = new java.util.ArrayList<AuthorizerSummary>(authorizers);
    }
1111298
static void ensureAccessible(AccessibleObject accessibleObject) {
        if (accessibleObject != null) {
            if (!accessibleObject.isAccessible()) {
                if (System.getSecurityManager() != null) {
                    AccessController.doPrivileged(SetAccessibleAction.of(accessibleObject));
                } else {
                    accessibleObject.setAccessible(true);
                }
            }
        }
    }
1114737
public static void setEnabled (final boolean bEnabled)
  {
    s_aEnabled.set (bEnabled);
    if (LOGGER.isInfoEnabled ())
      LOGGER.info ("ValueEnforcer checks are now " + (bEnabled ? "enabled" : "disabled"));
  }
1128605
public static void doAuthorization(UserSession session,String uri) throws UnauthorizedException,ForbiddenAccessException{
		boolean isSuperAdmin = getInstance().decisionProvider.superAdminName().equals(session.getUserName());
		if(!isSuperAdmin && !getInstance().resourceManager.isAnonymous(uri)){
			if(session == null || session.isAnonymous()){
				throw new UnauthorizedException();
			}
			String permssionCode = getInstance().resourceManager.getPermssionCode(uri);
			if(StringUtils.isNotBlank(permssionCode) 
					&& !getInstance().resourceManager.getUserPermissionCodes(session.getUserId()).contains(permssionCode)){
				throw new ForbiddenAccessException();
			}
		}
		//
		if(session != null && !session.isAnonymous()){			
			getInstance().decisionProvider.authorizedPostHandle(session);
		}
	}
824228
def authorized?(action, subject)
      return false unless subject
      klass = subject.is_a?(Class) ? subject : subject.class
      authorizer_of(klass).authorized? action, subject
    end
1262320
public static void setCurrentAuthentication(Authentication authentication) {
        RequestContext context = RequestContext.getCurrent();
        if (context != null) {
            setAuthentication(context.getRequest(), authentication);
        }
    }
206563
static void setAccessible(final Method m, final boolean value)
   {
      AccessController.doPrivileged(new PrivilegedAction<Object>() 
      {
         public Object run()
         {
            m.setAccessible(value);
            return null;
         }
      });
   }
66151
public void setEnabled(boolean enabled)
	{
		if (isEnabled() == enabled)
			return;

		if (!fireEvent(new DisabledStateChange<>(this, enabled)))
			return;

		this.enabled = enabled;
		if (enabled)
		{
			setHovered(false);
			setFocused(false);
		}
	}
1287108
@DELETE
  @Path("/{path: .*}")
  public void enable(@PathParam("path") String path, @HeaderParam("Authorization") @DefaultValue("no token") String auth) throws Exception {
    sendJGroupsMessage(UpdateOpteration.ENABLE, path, auth);
  }
748996
boolean authorize(String resource) throws IOException {
    if (passwordProvider == null) {
      throw new IOException(
          "Authorization failed - no password provider present "
              + "(you must call setPasswordProvider)");
    }

    if (passwordProvider.canAuthenticate(resource)) {
      // RPC code FOR SANE_NET_AUTHORIZE
      outputStream.write(SaneRpcCode.SANE_NET_AUTHORIZE);
      outputStream.write(resource);
      outputStream.write(passwordProvider.getUsername(resource));
      writePassword(resource, passwordProvider.getPassword(resource));
      outputStream.flush();

      // Read dummy reply and discard (according to the spec, it is unused).
      inputStream.readWord();
      return true;
    }

    return false;
  }
551098
synchronized public void setWantClientAuth(boolean flag) {
        doClientAuth = (flag ?
            SSLEngineImpl.clauth_requested : SSLEngineImpl.clauth_none);

        if ((handshaker != null) &&
                (handshaker instanceof ServerHandshaker) &&
                !handshaker.activated()) {
            ((ServerHandshaker) handshaker).setClientAuth(doClientAuth);
        }
    }