Revision 345dcf39
b/snf-pithos-backend/pithos/backends/base.py | ||
---|---|---|
413 | 413 |
return {} |
414 | 414 |
|
415 | 415 |
def update_object_permissions(self, user, account, container, name, permissions): |
416 |
"""Update the permissions associated with the object. |
|
416 |
"""Update (set) the permissions associated with the object.
|
|
417 | 417 |
|
418 | 418 |
Parameters: |
419 |
'permissions': Dictionary with permissions to update
|
|
419 |
'permissions': Dictionary with permissions to set
|
|
420 | 420 |
|
421 | 421 |
Raises: |
422 | 422 |
NotAllowedError: Operation not permitted |
b/snf-pithos-backend/pithos/backends/lib/sqlalchemy/permissions.py | ||
---|---|---|
70 | 70 |
self.xfeature_destroy(path) |
71 | 71 |
return |
72 | 72 |
feature = self.xfeature_create(path) |
73 |
self.feature_clear(feature, READ) |
|
74 |
self.feature_clear(feature, WRITE) |
|
73 | 75 |
if r: |
74 |
self.feature_clear(feature, READ) |
|
75 | 76 |
self.feature_setmany(feature, READ, r) |
76 | 77 |
if w: |
77 |
self.feature_clear(feature, WRITE) |
|
78 | 78 |
self.feature_setmany(feature, WRITE, w) |
79 | 79 |
|
80 | 80 |
def access_get(self, path): |
b/snf-pithos-backend/pithos/backends/lib/sqlite/permissions.py | ||
---|---|---|
67 | 67 |
self.xfeature_destroy(path) |
68 | 68 |
return |
69 | 69 |
feature = self.xfeature_create(path) |
70 |
self.feature_clear(feature, READ) |
|
71 |
self.feature_clear(feature, WRITE) |
|
70 | 72 |
if r: |
71 |
self.feature_clear(feature, READ) |
|
72 | 73 |
self.feature_setmany(feature, READ, r) |
73 | 74 |
if w: |
74 |
self.feature_clear(feature, WRITE) |
|
75 | 75 |
self.feature_setmany(feature, WRITE, w) |
76 | 76 |
|
77 | 77 |
def access_get(self, path): |
Also available in: Unified diff