lgwillmore / warden

Kotlin Attribute Based Access Control
MIT License
19 stars 3 forks source link

Can't create an `AttributeType` because it's an enum #39

Closed aSemy closed 2 years ago

aSemy commented 2 years ago

I'm following the docs, but I can't see how to make a new instance of AttributeType, because it's an enum

https://warden-kotlin.netlify.app/attributes/#hasattributes-and-attributetype

val USER_TYPE = AttributeType(
    type = "USER",
    typeKeyword = "authType"
)

https://github.com/lgwillmore/warden/blob/e3e984ccad746e0615cfb347002ad2d6b183f4d0/core/src/commonMain/kotlin/codes.laurence.warden/policy/expression/policies.kt#L102-L107

aSemy commented 2 years ago

I also can't access HasAttributesI.

I think a step was missed when the 'attributes' module was split into a different module. It's not available, or exposed as an API dependency from the core module. I can't see what the artifact is called because the jfrog Maven repo doesn't seem to allow navigating the directory structure.

lgwillmore commented 2 years ago

Sorry, no reliable internet till Monday. New module artifact is 'warden-atts'.

Will update docs with installation/dependencies.

Edit: ah, and that name is clashing with a part of the policy DSL? Will need to fix that.

lgwillmore commented 2 years ago

Fixed by pr #41 . Documentation also updated for installation of dependency. Available in release 0.3.0

lgwillmore commented 2 years ago

Hey, sorry. Not on reliable internet till Monday. Yes, spilt out to 'warden-atts' artifact. Will add the import installation docs.

On Mon, 18 Jul 2022, 17:24 aSemy, @.***> wrote:

I also can't access HasAttributesI.

I think a step was missed when the 'attributes' module was split into a different module. It's not available, or exposed as an API dependency from the core module. I can't see what the artifact is called because the jfrog Maven repo doesn't seem to allow navigating the directory structure.

— Reply to this email directly, view it on GitHub https://github.com/lgwillmore/warden/issues/39#issuecomment-1187638035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMGBONAFSN3CTGFBLCNRDVUVZKFANCNFSM533YGFSQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>