sitepoint-editors / Rauth

A basic annotation-based ACL package for PHP
MIT License
41 stars 4 forks source link

Added exceptions and reasons #8

Closed Swader closed 8 years ago

Swader commented 8 years ago

Instead of returning false, the authorize method now throws an exception when authorization fails.

This AuthException contains a property type which indicates the type of the exception (ban, and, or, none, or any custom mode that can later be added in) and an array of Reason objects each of which contains the public properties group, has and needs. See README for more information about these changes.

Swader commented 8 years ago

Solves #1 if merged.