Examples of checkLoggedIn()


Examples of org.sonar.server.user.UserSession.checkLoggedIn()

    ruleDeleter.delete(ruleKey);
  }

  private void checkPermission() {
    UserSession userSession = UserSession.get();
    userSession.checkLoggedIn();
    userSession.checkGlobalPermission(GlobalPermissions.QUALITY_PROFILE_ADMIN);
  }
}
View Full Code Here

Examples of org.sonar.server.user.UserSession.checkLoggedIn()

    checkProjectAdminUser(null);
  }

  static void checkProjectAdminUser(@Nullable String componentKey) {
    UserSession currentSession = UserSession.get();
    currentSession.checkLoggedIn();
    if (componentKey == null) {
      currentSession.checkGlobalPermission(GlobalPermissions.SYSTEM_ADMIN);
    } else {
      if (!currentSession.hasGlobalPermission(GlobalPermissions.SYSTEM_ADMIN) && !currentSession.hasProjectPermission(UserRole.ADMIN, componentKey)) {
        throw new ForbiddenException("Insufficient privileges");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.