mirror of
https://github.com/bellingcat/auto-archiver-setup-tool.git
synced 2026-06-13 05:58:37 +03:00
fixing available groups in sheet/url
This commit is contained in:
@@ -92,8 +92,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
availableGroups: [{ title: "only me", value: "" }].concat((this.$store.state.user?.groups || []).map(g => ({ title: g, value: g }))),
|
||||
|
||||
url: "",
|
||||
public: true,
|
||||
group: "",
|
||||
@@ -124,6 +122,14 @@ export default {
|
||||
validUrl() {
|
||||
return this.url && this.urlValidator(this.url) === true;
|
||||
},
|
||||
availableGroups() {
|
||||
const permissions = this.$store.state.user?.permissions || {};
|
||||
return [{ title: "only me", value: "" }].concat(
|
||||
Object.keys(permissions)
|
||||
.filter(group => group !== "all" && permissions[group].archive_url)
|
||||
.map(g => ({ title: g, value: g }))
|
||||
);
|
||||
},
|
||||
globalUsage() {
|
||||
return this.$store.state.user?.usage || {};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user