Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • A aurweb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 86
    • Issues 86
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Arch LinuxArch Linux
  • aurweb
  • Merge requests
  • !514

fix: display "Unflag package" to users who initiated the flag

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Kevin Morris requested to merge kevr/aurweb:fix-user-unflag into master Aug 15, 2022
  • Overview 1
  • Commits 1
  • Pipelines 5
  • Changes 2

The original change which fixed another issue by introduced this inconsistency was located in !488 (merged)

What happened was:

  1. Before !488 (merged), the "Unflag package" link was incorrectly shown to all users, even if they couldn't use it. So, users without authority were able to click the link which led them to a bad response.
  2. !488 (merged) solved 1 by only displaying that link for co-maintiainers and maintainers in particular.
  3. With 2, this also removed the "Unflag package" link for the user who initiated the flag on a package.
  4. With this commit, we restore the ability for users who initiated a flag to view the "Unflag package" link, while keeping it hidden for other users which have nothing to do with the package (in terms of flag state).

As of now, the following can both view and use "Unflag package":

  • Maintainer of the package
  • Co-maintainers of the package
  • User who flagged the package

While all other users would be able to see the flag comment, but not perform anything having to do with unflagging the package.

Closes #380 (closed)

Signed-off-by: Kevin Morris kevr@0cost.org

Edited Aug 15, 2022 by Kevin Morris
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-user-unflag