ability-js icon indicating copy to clipboard operation
ability-js copied to clipboard

able.to view helper: check access or assign access?

Open gautamarora opened this issue 13 years ago • 4 comments

Hi, Is the use of the able.to helper to check if the user has access on a certain target or to assign access to a target.

From the docs, i expected it to check access, but it seems it assigns.

I have the fix in place if this is a bug, or else think another helper to check access will be useful.

gautamarora avatar May 03 '12 07:05 gautamarora

It should just check access, assigning should, use the abilities definition in the example. Though, as per this request and your others: I can not legally continue work on this project, though I can advise on it and will be happy to take pull requests and/or someone to takeover the project. It exists as it is today because I extracted what parts I could.

scottkf avatar May 03 '12 10:05 scottkf

ok, i think there was a bug and instead of checking it was assigning the ability. fixed at: https://github.com/gautamarora/ability-js/commit/6e8b09c77f6af447c2df91747dd985e27f764770

can issue a pull, if you think its right

gautamarora avatar May 04 '12 05:05 gautamarora

That's correct, go ahead and submit a pull request!

scottkf avatar May 07 '12 14:05 scottkf

@gautamarora I hereby nominate you to take it over :)

sbabigian avatar May 15 '12 20:05 sbabigian