protected void addAuthorizationToRole(PermissionEntity role, String roleAuthorizationID) {
    if ((role != null) && !StringUtils.isEmpty(roleAuthorizationID)) {
      RoleAuthorizationDAO roleAuthorizationDAO = injector.getInstance(RoleAuthorizationDAO.class);
      RoleAuthorizationEntity roleAuthorization = roleAuthorizationDAO.findById(roleAuthorizationID);

      if (roleAuthorization != null) {
        PermissionDAO permissionDAO = injector.getInstance(PermissionDAO.class);
        role.getAuthorizations().add(roleAuthorization);
        permissionDAO.merge(role);
      }
    }
  }
Add a new authorization to the set of authorizations for a role

@param role                the role to add the authorization to
@param roleAuthorizationID the authorization to add
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java