Skip to content
Snippets Groups Projects
Commit aa4656bb authored by Haelwenn's avatar Haelwenn
Browse files

users.js: call fetchSettings only if admin

parent 70ccb9b2
No related branches found
No related tags found
3 merge requests!326Mergeback: 2.5.0,!315Handle moderation privileges,!282Release/2.5.0
Pipeline #43003 passed
......@@ -220,6 +220,10 @@ const users = {
dispatch('FetchTagPolicySetting')
},
async FetchTagPolicySetting({ commit, getters }) {
if (!getters.roles.includes('admin')) {
return
}
// XXX: Use nodeinfo?
const { data } = await fetchSettings(getters.authHost, getters.token)
const mrfSettings = data.configs.find(el => el.key === ':mrf')
? data.configs.find(el => el.key === ':mrf').value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment