nocodb icon indicating copy to clipboard operation
nocodb copied to clipboard

hide project actions from non owners

Open vijayrathore8492 opened this issue 3 years ago • 2 comments

Signed-off-by: Vijay Kumar Rathore [email protected]

Change Summary

Project EDIT and DELETE buttons are shown to all the users on the project List string. This PR hides actions from noneligible users.

Change type

  • [ ] feat: (new feature for the user, not a new feature for build script)
  • [ ] fix: (bug fix for the user, not a fix to a build script)
  • [ ] docs: (changes to the documentation)
  • [ ] style: (formatting, missing semi colons, etc; no production code change)
  • [ ] refactor: (refactoring production code, eg. renaming a variable)
  • [ ] test: (adding missing tests, refactoring tests; no production code change)
  • [ ] chore: (updating grunt tasks etc; no production code change)

Test/ Verification

Provide summary of changes.

Additional information / screenshots (optional)

Anything for maintainers to be made aware of User 1 Screenshot 2022-11-01 at 19 05 50

User 2 Screenshot 2022-11-01 at 19 06 20

vijayrathore8492 avatar Nov 01 '22 13:11 vijayrathore8492

Is it still WIP? Didn't see the logic to hide project actions. Just FYI, Api2.ts is going to be removed soon.

Added the missing code now.

vijayrathore8492 avatar Nov 01 '22 13:11 vijayrathore8492

cc: @pranavxc for the role related issue

wingkwong avatar Nov 03 '22 06:11 wingkwong

@o1lab Is it part of next release?

vijayrathore8492 avatar Nov 08 '22 12:11 vijayrathore8492

@vijayrathore8492 We will review it and if all is good will include it as part of the next release :+1:

pranavxc avatar Nov 08 '22 12:11 pranavxc

Hi, @vijayrathore8492 sorry for the delayed reply. It will be helpful if you can do a rebase. We made a few changes related to the project list so you may have to update Project.list(for getting all projects, used for super admin) and ProjectUser.getProjectsList(for getting invited project list). For super admin, you can show all actions regardless of project level role.

pranavxc avatar Nov 28 '22 10:11 pranavxc

@wingkwong Does this PR align with the new changes? I just checked that a user can only see the projects that it has access to, other projects are not visible to him anymore.

vijayrathore8492 avatar Nov 30 '22 06:11 vijayrathore8492

@vijayrathore8492 : then we can close this PR.

pranavxc avatar Nov 30 '22 06:11 pranavxc

@vijayrathore8492 closing this PR based on discussion above.

dstala avatar Dec 01 '22 15:12 dstala