Fix RBAC and ACL access for managing secret containers
This patch adds the missing access control data to enforce access control for adding/removing secrets in containers. Change-Id: I6879f566117db5ec0099ddad35ba649a3c674bd1 (cherry picked from commit922c68bada
) (cherry picked from commitc8d3c58014
) (cherry picked from commitef28147365
) (cherry picked from commitc39bb67a74
)
This commit is contained in:
parent
e7a714bd1f
commit
f22739f1bc
@ -235,6 +235,12 @@ class ContainersSecretsController(controllers.ACLMixin):
|
|||||||
self.secret_repo = repo.get_secret_repository()
|
self.secret_repo = repo.get_secret_repository()
|
||||||
self.validator = validators.ContainerSecretValidator()
|
self.validator = validators.ContainerSecretValidator()
|
||||||
|
|
||||||
|
def get_acl_tuple(self, req, **kwargs):
|
||||||
|
acl = self.get_acl_dict_for_user(req, self.container.container_acls)
|
||||||
|
acl['project_id'] = self.container.project.external_id
|
||||||
|
acl['creator_id'] = self.container.creator_id
|
||||||
|
return ('container', acl)
|
||||||
|
|
||||||
@pecan.expose(generic=True)
|
@pecan.expose(generic=True)
|
||||||
def index(self, **kwargs):
|
def index(self, **kwargs):
|
||||||
pecan.abort(405) # HTTP 405 Method Not Allowed as default
|
pecan.abort(405) # HTTP 405 Method Not Allowed as default
|
||||||
|
Loading…
Reference in New Issue
Block a user