- Code: Select all
error: "Roles" is not a valid named attribute argument because it is not a valid attribute parameter type
Code of the Attribute
- Code: Select all
class AuthenticationAttribute inherits FilterAttribute
has AttributeUsage(AttributeTargets.Class, allowMultiple = false, inherited = true), Serializable
pro roles from var as List<of String>
cue init()
base.init(ExecuteWhen.BeforeAction, AuthenticationFilter)
Code where I use the attribute
- Code: Select all
class AdminController inherits ARSmartDispatcherController
has AuthenticationAttribute(roles = ["admin"])
Maybe I made some stupid error I overlooked, I really need to get some sleep now But could it be the compiler is looking for a property the C# way, with a capitalized first letter?