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

SecurityTrimmedControl - No permissions template #307

Closed
antoniobriones opened this issue May 20, 2019 · 6 comments · Fixed by #474
Closed

SecurityTrimmedControl - No permissions template #307

antoniobriones opened this issue May 20, 2019 · 6 comments · Fixed by #474
Labels
help wanted type:enhancement New feature or enhancement of existing capability
Milestone

Comments

@antoniobriones
Copy link

Hi, this is just a suggestion..

I implemented this control to handle the logic of checking user permissions for me, but then i realized I had to put some message if the user didn't have them, otherwise, the entire section would be empty and the user wouldn't understand what was going on.

Since this control doesn't have any "No permissions template" i finally had to write code to check if the user didn't have permissions and show a placeholder with a message in that case, finally, ended up using my custom code for everything, would be great if it could have this functionlity too.

@ghost
Copy link

ghost commented May 20, 2019

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label May 20, 2019
@estruyf estruyf added type:enhancement New feature or enhancement of existing capability help wanted and removed Needs: Triage 🔍 labels May 22, 2019
@estruyf
Copy link
Member

estruyf commented May 22, 2019

Thanks! This could be a nice enhancement to the control.

@sympmarc
Copy link

Above comment looks to be spam. Are there mechanism here to handle?

@Varuuna
Copy link

Varuuna commented Jun 17, 2019

I would be willing to create a PR for this issue, but wouldn't mind a bit of advise on how to best implement it. The control was designed to display content when the permissions matched, so what is the best approach when you suddenly want to do the complete opposite?

@antoniobriones
Copy link
Author

I would modify the control to receive two templates, the default one for "permissions match" and one other, optional, for "not enough permissions".

@mgwojciech
Copy link

Looked like an easy thing. There is pull request waiting:
#474

@pnp pnp deleted a comment from oveiyakrish Mar 23, 2020
@estruyf estruyf added this to the 1.17.0 milestone Mar 23, 2020
@estruyf estruyf closed this as completed Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type:enhancement New feature or enhancement of existing capability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants