Merge "API: remove admin require from certificate_* from db layer"

This commit is contained in:
Jenkins 2015-07-19 10:47:29 +00:00 committed by Gerrit Code Review
commit d9d877b9a7

View File

@ -691,7 +691,6 @@ def compute_node_statistics(context):
###################
@require_admin_context
def certificate_create(context, values):
certificate_ref = models.Certificate()
for (key, value) in values.items():
@ -700,21 +699,18 @@ def certificate_create(context, values):
return certificate_ref
@require_admin_context
def certificate_get_all_by_project(context, project_id):
return model_query(context, models.Certificate, read_deleted="no").\
filter_by(project_id=project_id).\
all()
@require_admin_context
def certificate_get_all_by_user(context, user_id):
return model_query(context, models.Certificate, read_deleted="no").\
filter_by(user_id=user_id).\
all()
@require_admin_context
def certificate_get_all_by_user_and_project(context, user_id, project_id):
return model_query(context, models.Certificate, read_deleted="no").\
filter_by(user_id=user_id).\