53 |
53 |
54 Params: |
54 Params: |
55 original_params: a dict with params for this View |
55 original_params: a dict with params for this View |
56 """ |
56 """ |
57 |
57 |
|
58 all = "%(scope_path)s/%(link_id)s" |
|
59 |
58 rights = access.Checker(params) |
60 rights = access.Checker(params) |
59 rights['any_access'] = ['allow'] |
61 rights['any_access'] = ['allow'] |
60 rights['show'] = ['allow'] |
62 rights['show'] = ['allow'] |
61 rights['create'] = ['checkIsDeveloper'] |
63 rights['create'] = ['checkIsDeveloper'] |
62 rights['edit'] = [('checkHasActiveRoleForScope', |
64 rights['edit'] = [('checkHasActiveRoleForScope', |
63 [org_admin_logic.logic, 'link_id']), |
65 [org_admin_logic.logic, all]), |
64 ('checkIsActive', [org_logic.logic, None])] |
66 ('checkIsActive', [org_logic.logic, None])] |
65 rights['delete'] = ['checkIsDeveloper'] |
67 rights['delete'] = ['checkIsDeveloper'] |
66 rights['home'] = ['allow'] |
68 rights['home'] = ['allow'] |
67 rights['public_list'] = ['allow'] |
69 rights['public_list'] = ['allow'] |
68 rights['apply_mentor'] = ['checkIsUser'] |
70 rights['apply_mentor'] = ['checkIsUser'] |
69 rights['list_requests'] = [('checkHasActiveRoleForScope', |
71 rights['list_requests'] = [('checkHasActiveRoleForScope', |
70 [org_admin_logic.logic, 'link_id'])] |
72 [org_admin_logic.logic, all])] |
71 rights['list_roles'] = [('checkHasActiveRoleForScope', |
73 rights['list_roles'] = [('checkHasActiveRoleForScope', |
72 [org_admin_logic.logic, 'link_id'])] |
74 [org_admin_logic.logic, all])] |
73 rights['applicant'] = [('checkIsApplicationAccepted', |
75 rights['applicant'] = [('checkIsApplicationAccepted', |
74 org_app_logic.logic)] |
76 org_app_logic.logic)] |
75 |
77 |
76 new_params = {} |
78 new_params = {} |
77 new_params['logic'] = soc.logic.models.organization.logic |
79 new_params['logic'] = soc.logic.models.organization.logic |