equal
deleted
inserted
replaced
54 """ |
54 """ |
55 |
55 |
56 rights = access.Checker(params) |
56 rights = access.Checker(params) |
57 rights['any_access'] = ['allow'] |
57 rights['any_access'] = ['allow'] |
58 rights['show'] = ['allow'] |
58 rights['show'] = ['allow'] |
|
59 rights['create'] = ['checkIsHost'] |
|
60 rights['edit'] = ['checkIsHostForProgram'] |
|
61 rights['delete'] = ['checkIsHostForProgram'] |
59 |
62 |
60 new_params = {} |
63 new_params = {} |
61 new_params['logic'] = soc.logic.models.program.logic |
64 new_params['logic'] = soc.logic.models.program.logic |
62 new_params['rights'] = rights |
65 new_params['rights'] = rights |
63 |
66 |
141 |
144 |
142 rights.setCurrentUser(id, user) |
145 rights.setCurrentUser(id, user) |
143 filter_args = {} |
146 filter_args = {} |
144 |
147 |
145 for entity in entities: |
148 for entity in entities: |
146 filter_args['scope_path'] = entity.key().name() |
149 filter_args['entity'] = entity |
147 try: |
150 try: |
148 rights.doCheck('checkIsHost', filter_args, []) |
151 rights.doCheck('checkIsProgramActive', filter_args, []) |
149 except out_of_band.Error: |
152 except out_of_band.Error: |
150 continue |
153 continue |
151 |
154 |
152 menu = {} |
155 menu = {} |
153 menu['heading'] = entity.short_name |
156 menu['heading'] = entity.short_name |