Onur Yıldırım

Results 77 comments of Onur Yıldırım

Hi. `IAccessInfo` only has a `denied` flag. See constructor of [`Access` class](https://github.com/onury/accesscontrol/blob/master/src/core/Access.ts#L54) for details. Closing this. Pls continue thread if you need to.

First of all, both your `IQueryInfo` and `IAccessInfo` objects should have a `role` property. Second, as mentioned before, `IAccessInfo` does not have it. `granted` is a property of `AccessControl~Permission` instance....

Don't do that. `IAccessInfo` is a core interface already. You have the [`Permission` class](https://github.com/onury/accesscontrol/blob/master/src/core/Permission.ts). ```js const permission: Permission = ac.permission(query); ``` This has `granted: Boolean`, `roles: string[]`, `resource: String`, `attributes:...

Yes. Now that we have an understanding, I'm re-opening this issue as a feature-request.

You're very welcome. No worries at all.

Sorry for late reply. You can check out [possession](https://onury.io/accesscontrol/#actions-and-action-attributes) concept and this [post](https://github.com/onury/accesscontrol/issues/14#issuecomment-328316670). ~~Closing. You can re-open if you need to.~~ "all profiles except another admin" — Possession does not...

Yes it'd be a clean shorthand. Actually, `.create()` is an alias of `.createAny()` » under the hood, it defaults the possession to `any`.. I'm considering a very similar API for...

We won't lose the attribute filtering feature or anything if that's what you mean. On the contrary, will have more control on the attributes. But (per your example) you don't...

Possession, in AccessControl is actually an **extra** feature. If you don't really need them; you can simply ignore them... i.e. use `.create()` instead of both `.createOwn()` or `.createAny()`. But they...

@psi-4ward somehow I missed your last post. You can move your AC initialization and permission checks to a separate file, if that's what you mean. The check has to be...