Page MenuHomeSoftware Heritage

admin/deposit: Allow users with permission to list their deposits
ClosedPublic

Authored by anlambert on Oct 20 2021, 2:01 PM.

Details

Summary

Users with the "swh.web.admin.list_deposits" permission (deposit clients)
will be able to access the deposits administration interface.

Only their own deposits will be displayed.

Related to T3174

Test Plan

Tests for links and deposits admin view access have been added.

Deposits admin view access for deposit clients have also been successfully tested in docker.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 20 2021, 2:29 PM
Harbormaster failed remote builds in B24577: Diff 23688!

build was not running, i stopped and triggered another one...

nvm that, that's a web build not a deposit one ¯\_(ツ)_/¯

Build was aborted

Patch application report for D6518 (id=23688)

Rebasing onto ba1801812e...

Current branch diff-target is up to date.
Changes applied before test
commit a8cfc14b4a5cae4373f9a67725de3e6bd4cad77d
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 19 15:49:03 2021 +0200

    admin/deposit: Allow users with permission to list their deposits
    
    Users with the "swh.web.admin.list_deposits" permission (deposit clients)
    will be able to access the deposits administration interface.
    
    Only their own deposits will be displayed.
    
    Related to T3174

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1197/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1197/console

Build is green

Patch application report for D6518 (id=23688)

Rebasing onto ba1801812e...

Current branch diff-target is up to date.
Changes applied before test
commit a8cfc14b4a5cae4373f9a67725de3e6bd4cad77d
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 19 15:49:03 2021 +0200

    admin/deposit: Allow users with permission to list their deposits
    
    Users with the "swh.web.admin.list_deposits" permission (deposit clients)
    will be able to access the deposits administration interface.
    
    Only their own deposits will be displayed.
    
    Related to T3174

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1198/ for more details.

Build is green

Patch application report for D6518 (id=23688)

Rebasing onto ba1801812e...

Current branch diff-target is up to date.
Changes applied before test
commit a8cfc14b4a5cae4373f9a67725de3e6bd4cad77d
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 19 15:49:03 2021 +0200

    admin/deposit: Allow users with permission to list their deposits
    
    Users with the "swh.web.admin.list_deposits" permission (deposit clients)
    will be able to access the deposits administration interface.
    
    Only their own deposits will be displayed.
    
    Related to T3174

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1199/ for more details.

lgtm

swh/web/admin/deposit.py
24

did not know that decorator, how neat ;)

This revision is now accepted and ready to land.Oct 20 2021, 3:01 PM