#2827 Use decorators to check admin permission and session timeout
Closed by cverna. Opened by cverna.
cverna/pagure fix_2698  into  rearch

Download 2827.patch

This PR creates decorators that can be used to check if the user has admin permission and if the admin session has timeout.
A new module was created to have all custom decorator used gathered in the same place.

I have only run the unit test for the individual modules that were impacted. I have yet to run all set of test.

Fixes #2698

rebased onto a4f60d1c2e4ffd47cb513057e4ecd14f1b0df70e

6 new commits added

  • Cleanup after reach branch rebase
  • Use issue tracker decorator in ui/repo.py
  • New decorator for admin session timeout.
  • Add is_repo_admin decorator to ui/plugins.py
  • Add decorator to check admin permission.
  • Add a new decorators module.

rebased onto 687c32520b9ccdc9a7893b3826afc18141090c85

rebased onto e4db73a90cb7a49dbd999a5ea71e06de5193c57f

Ok I ran the tests and I got the following :
FAILED (SKIP=1, errors=1, failures=11)

That's one more failure than I expected, I have:

FAILED (SKIP=1, errors=1, failures=10)

rebased onto 829efcf4d4c4613f49d2d6dc539770f55108f0fb

rebased onto 8bba25e90d8432773e54568579d76b551a6a0389

closing to open new PR against master.

Pull-Request has been closed by cverna

Metadata