Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Actions Column for Users Without Permissions #22205

Open
m-aliozkaya opened this issue Feb 21, 2025 · 2 comments · May be fixed by #22238
Open

Hide Actions Column for Users Without Permissions #22205

m-aliozkaya opened this issue Feb 21, 2025 · 2 comments · May be fixed by #22238
Assignees
Milestone

Comments

@m-aliozkaya
Copy link
Contributor

Currently, the "Actions" column (which includes options like creating, editing, and deleting) is visible to all users in the management interface, regardless of their permissions. If a user does not have the necessary permissions for any of these actions, the column should not be displayed to avoid confusion and maintain a clean UI.

Expected Behavior:

The "Actions" column should only be visible to users who have at least one of the permissions (create, edit, or delete).

image

image

@realLiangshiwei
Copy link
Member

@m-aliozkaya
This is a problem, If the developer checks based on resource rather than permissions, In this case some rows have actions and some don't.

actionList.addManyTail(
  [
      {
          text: l("Edit"),
          visible: function (data){ return data.name == '.....'; }
      },
      {
          text: l("Delete"),
          visible: function (data){ hasDeletePermission || data.type == "....."},
          
      },
      {
          text: l("ViewDetails"),
          visible: hasViewDetailsPermission,
      }
  ]
);

@m-aliozkaya
Copy link
Contributor Author

Our design team suggested that if there are no permissions or resource-based checks, the Actions button should be disabled, and a tooltip should appear on hover explaining why it is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants