Feature #2043
closedCreate an advanced user status and only hide advanced settings if not an advanced user
0%
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).
Updated by Amber Herold over 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.
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