-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password protect settings #2932
Password protect settings #2932
Conversation
I use Also I am not sure if that section should be put on the top (as it might not be a frequently used setting) |
@ChunkyProgrammer I have just reviewed it lol |
Good point I will move it from the top to the bottom. I'll look into the setting not being persisted, perhaps I broke something when I was refactoring the code. I had previously seen my subscriptions and other settings being reset with yarn dev, but I have just checked it and that doesn't happen any more (but the password setting is lost). |
Head branch was pushed to by a user without write access
Ok I have moved the password settings to the bottom and fixed the setting persistence issue. I had not read the comments in settings.js properly, and was calling the autogenerated setter rather than the update call which actually persists things - it can't have ever worked before 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally
Relying on others to code review settings related code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, the code works but I have to say I am not a fan of the UX, having the enter password box in a settings section that is collapsed by default, doesn't make for a great unlocking experience.
It might be better if you split this up into two parts, the set, change and clear password settings section and then move the unlocking part into the Settings page. You could use v-if
and v-else
and centre the unlock box in the middle of the screen.
Yes that is a good idea, I will change the UX as you suggest @absidue |
Head branch was pushed to by a user without write access
f9af163
Head branch was pushed to by a user without write access
Fixed. |
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue' | ||
import FtSelect from '../ft-select/ft-select.vue' | ||
import FtCard from '../ft-card/ft-card.vue' | ||
import FtInput from '../ft-input/ft-input.vue' | ||
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue' | ||
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' | ||
import FtButton from '../ft-button/ft-button.vue' | ||
import FtPrompt from '../ft-prompt/ft-prompt.vue' | ||
|
||
export default Vue.extend({ | ||
name: 'PasswordDialog', | ||
components: { | ||
'ft-settings-section': FtSettingsSection, | ||
'ft-select': FtSelect, | ||
'ft-input': FtInput, | ||
'ft-card': FtCard, | ||
'ft-toggle-switch': FtToggleSwitch, | ||
'ft-flex-box': FtFlexBox, | ||
'ft-button': FtButton, | ||
'ft-prompt': FtPrompt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please remove the unused component imports, you only need to import and register the components that you use in the associated .vue file.
Head branch was pushed to by a user without write access
Title
Add panel to settings page to password protect settings.
Pull Request Type
Related issue
closes #2907
Description
Adds a panel to the settings page to password protect all settings. The password is currently stored in the clear along with other persistent settings.
If no password is set, the panel prompts the user to set a password. If a password is set, the other settings panels are hidden until the correct password is supplied. If the password is supplied, the settings are made visible and an option to remove the password is enabled.
Screenshots
Dialog to set a password to prevent access to settings
Dialog to enter a password to access settings (other settings are hidden)
Incorrect password prompt
Dialog to lock or remove the password when correct password has been entered
Testing
I have tested the PR manually by going through the following steps:
I have not observed any regressions due to my changes to the ft-input component, but would like some advice on what I should look for here.
Desktop
Pop_OS
22.04
18.0.0
Additional context