Skip to content

Commit ce4c7be

Browse files
authored
Add permission declarations for queues and light edges (SYN-8959, SYN-8973) (#4214)
1 parent 2872eab commit ce4c7be

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
desc: Added missing permission declarations for light edges and queues.
3+
prs: []
4+
type: bug
5+
...

synapse/cortex.py

+10
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,16 @@ def _initCorePerms(self):
13971397
{'perm': ('node', 'del', '<form>'), 'gate': 'layer',
13981398
'desc': 'Controls removing a specific form of node in a layer.'},
13991399

1400+
{'perm': ('node', 'edge', 'add'), 'gate': 'layer',
1401+
'desc': 'Controls adding light edges to a node.'},
1402+
{'perm': ('node', 'edge', 'del'), 'gate': 'layer',
1403+
'desc': 'Controls adding light edges to a node.'},
1404+
1405+
{'perm': ('node', 'edge', 'add', '<verb>'), 'gate': 'layer',
1406+
'desc': 'Controls adding a specific light edge to a node.'},
1407+
{'perm': ('node', 'edge', 'del', '<verb>'), 'gate': 'layer',
1408+
'desc': 'Controls adding a specific light edge to a node.'},
1409+
14001410
{'perm': ('node', 'tag'), 'gate': 'layer',
14011411
'desc': 'Controls editing any tag on any node in a layer.'},
14021412
{'perm': ('node', 'tag', 'add'), 'gate': 'layer',

synapse/lib/stormtypes.py

+10
Original file line numberDiff line numberDiff line change
@@ -3933,6 +3933,16 @@ class LibQueue(Lib):
39333933
'returns': {'type': 'list',
39343934
'desc': 'A list of queue definitions the current user is allowed to interact with.', }}},
39353935
)
3936+
_storm_lib_perms = (
3937+
{'perm': ('queue', 'add'), 'gate': 'cortex',
3938+
'desc': 'Permits a user to create a named queue.'},
3939+
{'perm': ('queue', 'get'), 'gate': 'queue',
3940+
'desc': 'Permits a user to access a queue. This allows the user to read from the queue and remove items from it.'},
3941+
{'perm': ('queue', 'put'), 'gate': 'queue',
3942+
'desc': 'Permits a user to put items into a queue.'},
3943+
{'perm': ('cron', 'del'), 'gate': 'queue',
3944+
'desc': 'Permits a user to delete a queue.'},
3945+
)
39363946
_storm_lib_path = ('queue',)
39373947

39383948
def getObjLocals(self):

0 commit comments

Comments
 (0)