lablup / backend.ai-webui

Backend.AI Web UI for web / desktop app (Windows/Linux/macOS). Backend.AI Web UI provides a convenient environment for users, while allowing various commands to be executed without CLI. It also provides some visual features that are not provided by the CLI, such as dashboards and statistics.
https://www.backend.ai
GNU Lesser General Public License v3.0
107 stars 72 forks source link

Admin role user can "modify" or "delete", but cannot "create" (keypair) resource policy #1375

Open lizable opened 2 years ago

lizable commented 2 years ago

Describe the bug A clear and concise description of what the bug is. 문제가 발생하는 상황에 대한 요약 설명을 적어주세요.

This issue has been discovered during code reviewing in #1327. Admin role user cannot create (keypair) resource policy, but only can "modify" or "delete".

To Reproduce Steps to reproduce the behavior: 문제를 재현하기 위한 순서를 자세히 적어주세요:

⚠️ NOTE: You need to login with admin role user, not superadmin role.

  1. Go to 'Users' page in Administration menu.
  2. Click on 'Resource Policies' tab.
  3. See Create Policy button is disabled, but Modify icon and Delete icon are enabled.

Expected behavior A clear and concise description of what you expected to happen. 원래 기대했던 동작은 어떤 것인지 명확하게 적어주세요. If admin role users do have a permission to modify and delete the resource policy, then they can also have a permission to create resource policy, too.

Screenshots If applicable, add screenshots to help explain your problem. Just take a screenshot in your clipboard or copy a picture file and paste it here (Ctrl+V/Cmd+V) so that GitHub automatically attach and insert it. 가능하다면, 문제 상황을 보여주는 스크린샷을 첨부해주세요. 클립보드에 스크린샷을 찍거나 이미지 파일을 복사해서 여기에 붙여넣으면(Ctrl+V/Cmd+V) GitHub이 자동으로 이곳에 첨부 및 삽입해줍니다.

Client:

Server:

Additional context Add any other context about the problem here. 추가적으로 문제 상황을 설명할 수 있는 다른 맥락을 기술해주세요.

inureyes commented 1 year ago

In the Resource Policy panel, only the admin can create / modify / delete the policies but originally, domain admin should also have same permission to execute action about resource policies. But current version of Backend.AI, this feature does not implement yet. Until the feature is implemented, I updated the resource policy control panel's button to disable for domain admin user.

refer https://github.com/lablup/backend.ai-webui/pull/1386