Add auth function for harvest_source_show_status
This commit is contained in:
parent
c76b7d95f3
commit
c2a6bd14eb
|
@ -34,6 +34,7 @@ def harvest_source_show(context,data_dict):
|
|||
:rtype: dictionary
|
||||
'''
|
||||
|
||||
|
||||
source_dict = logic.get_action('package_show')(context, data_dict)
|
||||
|
||||
# For compatibility with old code, add the active field
|
||||
|
@ -57,6 +58,10 @@ def harvest_source_show_status(context, data_dict):
|
|||
|
||||
:rtype: dictionary
|
||||
'''
|
||||
|
||||
p.toolkit.check_access('harvest_source_show_status', context, data_dict)
|
||||
|
||||
|
||||
model = context.get('model')
|
||||
|
||||
source = harvest_model.HarvestSource.get(data_dict['id'])
|
||||
|
|
|
@ -29,6 +29,13 @@ def harvest_source_show(context, data_dict):
|
|||
'msg': pt._('User {0} not authorized to read harvest source {1}')
|
||||
.format(user, source_id)}
|
||||
|
||||
def harvest_source_show_status(context, data_dict):
|
||||
'''
|
||||
Authorization check for getting the status of a harvest source
|
||||
|
||||
It forwards the checks to harvest_source_show.
|
||||
'''
|
||||
return harvest_source_show(context, data_dict)
|
||||
|
||||
def harvest_source_list(context, data_dict):
|
||||
'''
|
||||
|
|
Loading…
Reference in New Issue