added the ability for users to pass a conditions param to the grant function and allows the use of objects in the subject and resource params for all functions