Changeset 4255
- Timestamp:
- 09/10/08 09:50:16 (2 months ago)
- Files:
-
- timingandestimationplugin/branches/trac0.11-Permissions/setup.py (modified) (3 diffs)
- timingandestimationplugin/branches/trac0.11-Permissions/timingandestimationplugin/templates/billing.html (modified) (1 diff)
- timingandestimationplugin/branches/trac0.11-Permissions/timingandestimationplugin/webui.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
timingandestimationplugin/branches/trac0.11-Permissions/setup.py
r4233 r4255 6 6 7 7 setup(name=PACKAGE, 8 description='Plugin to make Trac support time estimation and tracking ',9 keywords='trac plugin estimation timetracking ',10 version='0.7. 0',8 description='Plugin to make Trac support time estimation and tracking with permissions', 9 keywords='trac plugin estimation timetracking permissions', 10 version='0.7.1', 11 11 url='http://www.trac-hacks.org/wiki/TimingAndEstimationPlugin', 12 12 license='http://www.opensource.org/licenses/mit-license.php', … … 14 14 author_email='russ@acceleration.net', 15 15 long_description=""" 16 This Trac 0.11 plugin provides support for Time estimation and tracking. 16 This Trac 0.11 plugin provides support for Time estimation and tracking, 17 and permissions to view and set those fields 17 18 18 19 See http://trac-hacks.org/wiki/TimingAndEstimationPlugin for details. … … 22 23 entry_points={'trac.plugins': '%s = %s' % (PACKAGE, PACKAGE)}) 23 24 25 26 #### FINANCIAL CONTRIBUTERS #### 27 # 28 # Obsidian Software: http://www.obsidiansoft.com/ 29 # Enterprise Solutions for Functional Processor 30 # Design Verification 31 # 32 ################################ 24 33 25 34 #### AUTHORS #### timingandestimationplugin/branches/trac0.11-Permissions/timingandestimationplugin/templates/billing.html
r2774 r4255 95 95 96 96 </ul> 97 <input type="submit" name="setbillingtime" value="Set Billing Time" onclick="return confirm('Are you sure that you want to create a billed date?')" /> 97 <input 98 py:if="is_time_admin" 99 type="submit" name="setbillingtime" value="Set Billing Time" onclick="return confirm('Are you sure that you want to create a billed date?')" /> 98 100 99 101 </div> timingandestimationplugin/branches/trac0.11-Permissions/timingandestimationplugin/webui.py
r3784 r4255 19 19 20 20 class TimingEstimationAndBillingPage(Component): 21 implements(I NavigationContributor, IRequestHandler, ITemplateProvider)21 implements(IPermissionRequestor, INavigationContributor, IRequestHandler, ITemplateProvider) 22 22 23 23 def __init__(self): 24 24 pass 25 26 # IPermissionRequestor methods 27 def get_permission_actions(self): 28 return ["TIME_VIEW", ("TIME_ADMIN", ["TIME_VIEW"]), ("TRAC_ADMIN", ["TIME_VIEW", "TIME_ADMIN"])] 25 29 26 30 def set_bill_date(self, username="Timing and Estimation Plugin", when=0): … … 53 57 def get_navigation_items(self, req): 54 58 url = req.href.Billing() 55 if req.perm.has_permission(" REPORT_VIEW"):59 if req.perm.has_permission("TIME_VIEW"): 56 60 yield 'mainnav', "Billing", \ 57 61 Markup('<a href="%s">%s</a>' % \ 58 (url , " Management"))62 (url , "Time Reports")) 59 63 60 64 # IRequestHandler methods … … 83 87 84 88 if req.method == 'POST': 85 if req.args.has_key('setbillingtime'): 86 self.set_bill_date(req.authname) 87 addMessage("All tickets last bill date updated") 89 if req.perm.has_permission("TIME_ADMIN"): 90 if req.args.has_key('setbillingtime'): 91 self.set_bill_date(req.authname) 92 addMessage("All tickets last bill date updated") 93 else: 94 addMessage("You don't have permission to set a new bill date!") 95 88 96 89 97 mgr = CustomReportManager(self.env, self.log) 90 98 data = {}; 99 data["is_time_admin"] = req.perm.has_permission("TIME_ADMIN") 91 100 data["statuses"] = get_statuses(self) 92 101 data["reports"] = mgr.get_reports_by_group(CustomReportManager.TimingAndEstimationKey);
