Do not allow to grant ssh/sftp perms to all_users (this is not allowed by the core anyway)

This commit is contained in:
Alexandre Aubin 2021-04-17 03:34:17 +02:00
parent 9e70259899
commit 3bc3c32767

View file

@ -182,6 +182,13 @@ export default {
}).map(({ id }) => permsDict[id].label)
}
if (groupName === 'all_users') {
// Forbid to add ssh and sftp permission on group `all_users`
group.disabledItems = permissions.filter(({ id }) => {
return ['ssh.main', 'sftp.main'].includes(id)
}).map(({ id }) => permsDict[id].label)
}
primaryGroups[groupName] = group
}