Only ask for password when updating admin rules

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-12-30 13:25:59 +01:00
parent 3203e81fea
commit df54bb901c
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 3 additions and 1 deletions

View File

@ -114,7 +114,9 @@ const store = new Vuex.Store({
context.commit('removeRule', rule)
},
async pushUpdateRule(context, rule) {
await confirmPassword()
if (context.state.scope === 0) {
await confirmPassword()
}
let result
if (rule.id < 0) {
result = await axios.post(getApiUrl(''), rule)