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

feat: Add links to users and roles in ACL dialog and handle invalid entries #2436

Merged
merged 4 commits into from
May 27, 2023

Conversation

FransGH
Copy link
Contributor

@FransGH FransGH commented May 25, 2023

New Pull Request Checklist

Issue Description

The PermissionsDialog currently offers no way to inspect users and roles.

Closes: #2435 and #2437

Approach

This makes roles and user in the most simple way clickable and open in a separate browser window (tab).
It avoids complex in-app navigation issues by not attempting to browse within the same window and offer an option to return back to the CLP dialog.

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

parse-github-assistant bot commented May 25, 2023

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@FransGH FransGH changed the title Browse user and roles from PermissionsDialog feat: Browse user and roles from PermissionsDialog May 25, 2023
@uffizzi-cloud
Copy link

uffizzi-cloud bot commented May 25, 2023

Uffizzi Ephemeral Environment deployment-26634

⌚ Updated May 25, 2023, 12:24 UTC

☁️ https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2436

📄 View Application Logs etc.

What is Uffizzi? Learn more

@FransGH
Copy link
Contributor Author

FransGH commented May 25, 2023

The way the url is composed is a bit hackie and will clearly fail if the current location is not ../browser/..
Didn't dive that deep into the code to get a clean base url but happy with suggestions!

@mtrezza mtrezza requested a review from a team May 25, 2023 17:25
@mtrezza mtrezza changed the title feat: Browse user and roles from PermissionsDialog feat: Browse user and roles from permissions dialog May 25, 2023
@mtrezza
Copy link
Member

mtrezza commented May 25, 2023

Could you add a before / after screenshot so its easier to see where the changes are?

@FransGH
Copy link
Contributor Author

FransGH commented May 25, 2023

Screenshot from v3.2.1 vs latest alpha. Don't ask me what happened to the role-objectIds between these versions, I didn't take them out. The only visual change as a result of the PR is that the names are now blue (= default link color) as opposed to grey and the cursor changes to a pointer while hovering (standard link behaviour).
PastedGraphic-2
PastedGraphic-1

@mtrezza
Copy link
Member

mtrezza commented May 25, 2023

I've just tried it out, I think it's nicely done, for me the links are even better visible than in your screenshot:
image

@mtrezza
Copy link
Member

mtrezza commented May 25, 2023

The way the url is composed is a bit hackie and will clearly fail if the current location is not ../browser/..

@parse-community/dashboard any suggestion?

@mtrezza mtrezza changed the title feat: Browse user and roles from permissions dialog feat: Browse user and roles from ACL dialog May 25, 2023
@mtrezza mtrezza changed the title feat: Browse user and roles from ACL dialog feat: Add links to users and roles in ACL dialog May 25, 2023
@FransGH
Copy link
Contributor Author

FransGH commented May 26, 2023

There appear to be two different layouts for the permission list. One shows the object id's the other doesn't. The one with the object Id's, like in your screenshot, looks better. I see both flavours on both the older and latest dashboard depending on the object's ACL.

This is now fixed, see #2437

@FransGH FransGH changed the title feat: Add links to users and roles in ACL dialog feat: Add links to users and roles in ACL dialog and handle invalid entries May 26, 2023
@FransGH
Copy link
Contributor Author

FransGH commented May 26, 2023

image

@mtrezza
Copy link
Member

mtrezza commented May 26, 2023

Great, could you explain, what is the "and handle invalid entries"?

@FransGH
Copy link
Contributor Author

FransGH commented May 26, 2023

Great, could you explain, what is the "and handle invalid entries"?
Basically fixed a bug that caused the render function to not work as intended when just one of the role or user objects was not found. With 'handling' I mean that they now explicitly appear as 'not found' on the UI.

@mtrezza
Copy link
Member

mtrezza commented May 26, 2023

Got it. That could have been a separate PR, but we can merge this as 1 since you it's already mixed.

In what cases do you think the URL approach could cause issues?

@FransGH
Copy link
Contributor Author

FransGH commented May 26, 2023

I haven't experienced any issues with the url approach so far. It really solved a major pain I was having while migrating from user to role based ACLs. Still like to improve how the url is composed so hoping for some feedback.

@mtrezza
Copy link
Member

mtrezza commented May 26, 2023

Well if there is no feedback then let's merge as is. If it's not working someone will hopefully open an issue and we can look at it then.

Maybe you want to take a look at the code and see how that is solved at other places?

If you take a look at this for example:

There's a generatePath import that may be helpful. It seems to be used to compose the URL from the current context.

@FransGH
Copy link
Contributor Author

FransGH commented May 26, 2023

Yep, that worked, thx!

Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com>
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mtrezza mtrezza merged commit a20cb8e into parse-community:alpha May 27, 2023
parseplatformorg pushed a commit that referenced this pull request May 27, 2023
# [5.2.0-alpha.2](5.2.0-alpha.1...5.2.0-alpha.2) (2023-05-27)

### Features

* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0-alpha.2

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label May 27, 2023
parseplatformorg pushed a commit that referenced this pull request Jun 8, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-08)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
parseplatformorg pushed a commit that referenced this pull request Jun 8, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-08)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
parseplatformorg pushed a commit that referenced this pull request Jun 8, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-08)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
parseplatformorg pushed a commit that referenced this pull request Jun 10, 2023
# [5.2.0-beta.2](5.2.0-beta.1...5.2.0-beta.2) (2023-06-10)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Hitting backspace key in data browser crashes dashboard ([#2456](#2456)) ([32aeea2](32aeea2))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))

### Features

* Add export of saved data browser filters via `classPreference` settings ([#2455](#2455)) ([f56f946](f56f946))
* Add filter views to save frequently used filters in data browser ([#2404](#2404)) ([a9ec3a9](a9ec3a9))
* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0-beta.2

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Jun 10, 2023
parseplatformorg pushed a commit that referenced this pull request Sep 15, 2023
# [5.2.0](5.1.0...5.2.0) (2023-09-15)

### Bug Fixes

* Back button in data browser disappears after page refresh ([#2421](#2421)) ([6c5f19f](6c5f19f))
* Cannot navigate to nested relation field in data browser ([#2420](#2420)) ([e7ace9e](e7ace9e))
* Dashboard crashes when adding a row with modal in a class that contains a pointer to another class that contains an array of pointers ([#2416](#2416)) ([286269f](286269f))
* Empty table in data browser when navigating back using the "back” button ([#2423](#2423)) ([6f3dab6](6f3dab6))
* File uploading status not updating in data browser ([#2422](#2422)) ([e761f97](e761f97))
* Hitting backspace key in data browser crashes dashboard ([#2456](#2456)) ([32aeea2](32aeea2))
* Incorrect date picker position in data browser filter dialog ([#2425](#2425)) ([b96b48f](b96b48f))
* Option missing for Parse Config parameter to require master key ([#2440](#2440)) ([6623369](6623369))
* Scroll position is preserved when re-opening the same class in data browser via navigation bar ([#2445](#2445)) ([667675c](667675c))
* Text input cursor jumps to first position when writing long text ([#2413](#2413)) ([422ffb2](422ffb2))
* Uncaught error when editing Number field in Edit Row dialog ([#2401](#2401)) ([26bd6fa](26bd6fa))

### Features

* Add export of saved data browser filters via `classPreference` settings ([#2455](#2455)) ([f56f946](f56f946))
* Add filter views to save frequently used filters in data browser ([#2404](#2404)) ([a9ec3a9](a9ec3a9))
* Add links to users and roles in ACL dialog and handle invalid entries ([#2436](#2436)) ([a20cb8e](a20cb8e))
* Add visual configurator for Parse Dashboard settings ([#2406](#2406)) ([228d839](228d839))
* Data types and pointer classes are sorted alphabetically in dialog to add new column ([#2400](#2400)) ([d9d285b](d9d285b))
* Sort Cloud Code Jobs alphabetically ([#2402](#2402)) ([77fc372](77fc372))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.2.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browse to users and roles from PermissionsDialog
3 participants