@Override
  public RequestStatus createResources(Request request)
      throws SystemException, UnsupportedPropertyException, ResourceAlreadyExistsException, NoSuchParentResourceException {
    Authentication authentication = AuthorizationHelper.getAuthentication();

    if (authentication == null || !authentication.isAuthenticated()) {
      throw new AuthorizationException("Authentication data is not available, authorization to perform the requested operation is not granted");
    } else if (!isAuthorizedToCreateResources(authentication, request)) {
      throw new AuthorizationException("The authenticated user does not have the appropriate authorizations to create the requested resource(s)");
    }

    return createResourcesAuthorized(request);
  }
Create the resources defined by the properties in the given request object.
<p/>
This implementation attempts to authorize the authenticated user before performing the requested
operation. If authorization fails, an AuthorizationException will be thrown.
<p/>
This method may be overwritten by implementing classes to avoid performing authorization checks
to create resources.

@param request the request object which defines the set of properties
               for the resources to be created
@return the request status
@throws SystemException                an internal system exception occurred
@throws UnsupportedPropertyException   the request contains unsupported property ids
@throws ResourceAlreadyExistsException attempted to create a resource which already exists
@throws NoSuchParentResourceException  a parent resource of the resource to create doesn't exist
@throws AuthorizationException         if the authenticated user is not authorized to perform this operation
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractAuthorizedResourceProvider.java