Changeset 9645


Ignore:
Timestamp:
16 Nov 2012, 10:17:52 (12 years ago)
Author:
Henrik Bettermann
Message:

Add permission to roles.

Show user id on reports page.

Show reports of all users (to be discussed).

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/reports.py

    r9637 r9645  
    4545    def update(self, job_id=None, DISCARD=None, DOWNLOAD=None):
    4646        self.entries = []
    47         user_id = self.request.principal.id
     47        #user_id = self.request.principal.id
    4848        if job_id and DISCARD:
    4949            entry = self.context.report_entry_from_job_id(job_id)
    5050            self.context.delete_report_entry(entry)
    5151            self.flash('Report discarded: %s' % job_id)
    52         self.entries = self.context.get_report_jobs_description(user_id)
     52        self.entries = self.context.get_report_jobs_description()
    5353        if job_id and DOWNLOAD:
    5454            self.redirect(self._report_url(job_id))
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/reportscontainerpage.pt

    r9644 r9645  
    55        <th i18n:translate="">Report Number</th>
    66        <th i18n:translate="">Description</th>
     7        <th i18n:translate="">Creator</th>
    78        <th i18n:translate="">Creation Date</th>
    89        <th i18n:translate="">Status</th>
     
    1718        <td>
    1819          <span tal:replace="python: entry[1]">REPORT DESCRIPTION</span>
     20        </td>
     21        <td>
     22          <span tal:replace="python: entry[6]">CREATOR</span>
    1923        </td>
    2024        <td nowrap>
  • main/waeup.kofa/trunk/src/waeup/kofa/permissions.py

    r9637 r9645  
    227227                     'waeup.loginAsStudent',
    228228                     'waeup.manageReports',
     229                     'waeup.manageJobs',
    229230                     )
    230231
     
    255256                     #'waeup.loginAsStudent',
    256257                     'waeup.manageReports',
     258                     #'waeup.manageJobs',
    257259                     )
    258260
  • main/waeup.kofa/trunk/src/waeup/kofa/reports.py

    r9644 r9645  
    154154
    155155    def get_report_jobs_description(user_id=None):
    156         """Get running/completed report jobs fur `user_id` as list of tuples.
     156        """Get running/completed report jobs for `user_id` as list of tuples.
    157157
    158158        The results contain enough information to render a status page
     
    490490                continue
    491491            result.append((job_id, job.description, status,
    492                            discardable, downloadable, starttime),)
     492                           discardable, downloadable, starttime, user_name),)
    493493        return result
    494494
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_reports.py

    r9644 r9645  
    395395        self.assertEqual(
    396396            result,
    397             [('2', 'Report 1 ()', u'running', False, False, None),]
     397            [('2', 'Report 1 ()', u'running', False, False, None, 'bob'),]
    398398            )
    399399        return
Note: See TracChangeset for help on using the changeset viewer.