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

[UI] Displaying elements based on user permissions in Twig #212

Open
wants to merge 10 commits into
base: 5.x
Choose a base branch
from

Conversation

andersonjeccel
Copy link
Contributor

This PR shows how to display things conditionally in Twig based on permissions for less-technical people.

@escopecz I'd like your review

@andersonjeccel andersonjeccel force-pushed the ui-Displaying-Elements-Based-on-User-Permissions branch from 5694a84 to c4cb0ae Compare September 9, 2024 20:46
Copy link
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

This is correct from the technical review point of view 👍

Copy link
Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

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

Some Vale fixes here - please also can you fix the heading nesting as it's using the wrong syntax.

For reference:

H1 ###
H2 ***
H3 ===
H4 ---
H5 ~~~


In each if statement, the securityIsGranted function is used with the corresponding permission string. If the current user has the specified permission, the code inside the if block will be executed, displaying the relevant form fields for editing the user profile information.

For more information, refer to the Security documentation.
Copy link
Member

Choose a reason for hiding this comment

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

Can we link to the relevant page/resource here?

@RCheesley RCheesley added documentation Improvements or additions to documentation pending-feedback hacktoberfest-accepted labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation hacktoberfest-accepted pending-feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants