mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-15 00:10:50 +08:00
Allow admin (and Host plugins) to create workspaces.
super_admin/fallback_admin already could; admin now has canCreateWorkspace, and Host-side creates without browser ALS (IM) are no longer blocked as forbidden. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
050b99426f
commit
89700ef4f9
6 changed files with 26 additions and 15 deletions
|
|
@ -192,4 +192,11 @@ describe('RolesStore view-all prefs', () => {
|
|||
assert.throws(() => store.setViewAllSessions('u1', true), (err) => err.code === 'forbidden_view_all_sessions')
|
||||
assert.throws(() => store.setViewAllSessions('a1', true), (err) => err.code === 'forbidden_view_all_sessions')
|
||||
})
|
||||
|
||||
it('lets admin, super_admin, and fallback_admin create workspaces', () => {
|
||||
assert.equal(computePermissions(ROLES.SUPER_ADMIN).canCreateWorkspace, true)
|
||||
assert.equal(computePermissions(ROLES.FALLBACK_ADMIN).canCreateWorkspace, true)
|
||||
assert.equal(computePermissions(ROLES.ADMIN).canCreateWorkspace, true)
|
||||
assert.equal(computePermissions(ROLES.USER).canCreateWorkspace, false)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue