62 params: a dict with params for this View |
62 params: a dict with params for this View |
63 """ |
63 """ |
64 |
64 |
65 rights = access.Checker(params) |
65 rights = access.Checker(params) |
66 rights['create'] = ['checkIsDeveloper'] |
66 rights['create'] = ['checkIsDeveloper'] |
67 rights['edit'] = [('checkCanStudentPropose', 'scope_path'), |
67 rights['edit'] = [('checkCanStudentPropose', ['scope_path', False]), |
68 ('checkRoleAndStatusForStudentProposal', |
68 ('checkRoleAndStatusForStudentProposal', |
69 [['proposer'], ['active'], ['new', 'pending']])] |
69 [['proposer'], ['active'], ['new', 'pending']])] |
70 rights['delete'] = ['checkIsDeveloper'] |
70 rights['delete'] = ['checkIsDeveloper'] |
71 rights['show'] = [ |
71 rights['show'] = [ |
72 ('checkRoleAndStatusForStudentProposal', |
72 ('checkRoleAndStatusForStudentProposal', |
74 ['active', 'inactive'], |
74 ['active', 'inactive'], |
75 ['new', 'pending', 'accepted', 'rejected']])] |
75 ['new', 'pending', 'accepted', 'rejected']])] |
76 rights['list'] = ['checkIsDeveloper'] |
76 rights['list'] = ['checkIsDeveloper'] |
77 rights['list_orgs'] = [ |
77 rights['list_orgs'] = [ |
78 ('checkIsStudent', ['scope_path', ['active']]), |
78 ('checkIsStudent', ['scope_path', ['active']]), |
79 ('checkCanStudentPropose', 'scope_path')] |
79 ('checkCanStudentPropose', ['scope_path', False])] |
80 rights['list_self'] = [ |
80 rights['list_self'] = [ |
81 ('checkIsStudent', ['scope_path', ['active', 'inactive']])] |
81 ('checkIsStudent', ['scope_path', ['active', 'inactive']])] |
82 rights['apply'] = [ |
82 rights['apply'] = [ |
83 ('checkIsStudent', ['scope_path', ['active']]), |
83 ('checkIsStudent', ['scope_path', ['active']]), |
84 ('checkCanStudentPropose', 'scope_path')] |
84 ('checkCanStudentPropose', ['scope_path', True])] |
85 rights['review'] = [('checkRoleAndStatusForStudentProposal', |
85 rights['review'] = [('checkRoleAndStatusForStudentProposal', |
86 [['org_admin', 'mentor', 'host'], |
86 [['org_admin', 'mentor', 'host'], |
87 ['active'], ['new', 'pending']])] |
87 ['active'], ['new', 'pending']])] |
88 |
88 |
89 new_params = {} |
89 new_params = {} |