UmbracoMemberAuthorizeAttribute optional parameter #13790
Sander-Los
started this conversation in
Features and ideas
Replies: 1 comment
-
Sounds like a good idea, but If im not wrong, this is a binary breaking change? At least it needs to be tested before we can introduce such a change. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
In the UmbracoMemberAuthorizeAttribute there is a posibility to allow membertype/membergroup/specific members.
When I want to apply this attribute to a controller, I have to specificly supply all 3 parameter while I for Example only want to provide membergroups.
Example from the documentation listed below:"
[UmbracoMemberAuthorize("", "VIP", "")]
Would it not be nicer to have the parameters being optional by setting a default value?
that way, we can specify what we want to provide:
[UmbracoMemberAuthorize(allowgroups:"VIP")]
I am curious what you thought about this.
https://docs.umbraco.com/v/10.x-lts/umbraco-cms/implementation/controllers#members-and-front-end-authorization
https://docs.umbraco.com/v/10.x-lts/umbraco-cms/reference/routing/umbraco-api-controllers/authorization#using-memberauthorizeattribute
Beta Was this translation helpful? Give feedback.
All reactions