public static void hideUploadButtonWhenNeeded(final Page page, final Session session,
      final UserManager userManager,
      final Boolean lockdownUploadProjects) {
    final User user = session.getUser();

    if (lockdownUploadProjects && !UserUtils.hasPermissionforAction(userManager, user,
        Permission.Type.UPLOADPROJECTS)) {
      page.add("hideUploadProject", true);
    }
  }
public static void hideUploadButtonWhenNeeded ( final Page page , final Session session , final UserManager userManager , final Boolean lockdownUploadProjects ) { final User user = session . getUser ( ) ; if ( lockdownUploadProjects && ! UserUtils . hasPermissionforAction ( userManager , user , Permission . Type . UPLOADPROJECTS ) ) { page . add ( "hideUploadProject" , true ) ; } }
Method hides the upload button for regular users from relevant pages when the property
"lockdown.upload.projects" is set. The button is displayed for admin users and users with
upload permissions.