Project

General

Profile

Actions

Feature #2043

closed

Create an advanced user status and only hide advanced settings if not an advanced user

Added by Amber Herold about 12 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Web interface
Target version:
Start date:
09/12/2012
Due date:
% Done:

0%

Estimated time:

Description

Neil added r17044 to hide appion loop options by default, such that the user needs to click on a link to show the options. This is annoying to Bridget as an advanced user, and she would like to see the advanced settings by default.

SO, in an effort to make everyone happy, I have added a checkbox to the user profile page "Always show advanced options" which basically deems this user an advanced user. In the future, if we want to hide advanced options, we should check to see if an advanced user is logged in. Now, the appion loop options are hidden for anyone who has not checked this box, and show up by default for anyone who has checked the box.

In terms of implementation, there is a bit of nastiness in that it assumes the username is the same for the Appion database and the username that the user enters in the processing page. I'm checking the database in the processing_header function to see if this is an advanced user, and setting $_SESSION['advanced_user'] based on the result. So while creating a processing web page, you can just check the $_SESSION variable to know if it is an advanced user. I'm not particularly fond of using a session variable for this, but it is easy.

I added a new column to the leginon database in the UserData table called "advanced". I also created a database upgrade script (not yet tested).

Actions #1

Updated by Amber Herold about 12 years ago

  • Status changed from Assigned to In Code Review
  • Assignee changed from Amber Herold to Anchi Cheng

Anchi, could you please review this, paying extra attention to the database bits, as it has been a while since I've had my hands in that code.

Actions #2

Updated by Anchi Cheng about 12 years ago

  • Status changed from In Code Review to In Test
  • Assignee changed from Anchi Cheng to Dmitry Lyumkis
Actions #3

Updated by Anchi Cheng almost 7 years ago

  • Status changed from In Test to Closed
Actions

Also available in: Atom PDF