gregory
|
0c82b94b32
|
ability to retrieve the roles associated to a bitmask
|
2015-02-11 16:45:31 -08:00 |
|
Oleg Sulyanov
|
6e561c5343
|
Add delete array of roles feature and new specs.
|
2014-04-04 13:37:32 +07:00 |
|
Martin Rehfeld
|
a4124cd651
|
role_symbols returns an Array, closes #22
DeclarativeAuthorization has problems with the Set-like
RoleModel::Roles class.
|
2012-10-29 20:17:06 +01:00 |
|
dwbutler
|
f1a4a79360
|
Define dynamic methods in a module so they can be overriden and still call super
|
2012-08-28 14:05:09 -07:00 |
|
dwbutler
|
04d0674ff1
|
Predefine dynamic queries from valid roles
|
2012-08-27 12:50:13 -07:00 |
|
dwbutler
|
9f8c48b69e
|
Ruby 1.8.7 compatibility
|
2012-08-27 10:55:29 -07:00 |
|
dwbutler
|
39caec8984
|
Added support for dynamic matchers
|
2012-08-27 09:55:19 -07:00 |
|
James McCarthy
|
aef2eb0e35
|
Added #has_only_roles? and #is_exactly? methods.
|
2012-05-28 20:05:14 +01:00 |
|
James McCarthy
|
c2f1f054b0
|
Simplified ClassMethods.mask_for.
|
2012-03-26 14:57:26 +01:00 |
|
James McCarthy
|
565e919863
|
Replaces use of role.respond_to?(:each) with role.is_a?(Set) in mask_for.
|
2011-09-06 10:09:12 +02:00 |
|
James McCarthy
|
3cefbf35da
|
Replaced use of map { |r| r.to_sym } with the more terse but idomatic map(&:to_sym).
|
2011-09-06 10:08:46 +02:00 |
|
James McCarthy
|
f9343c70c0
|
Forces the order of valid roles upon sanitized roles in mask_for and sets the bitmaks default value to 0.
|
2011-09-06 10:08:19 +02:00 |
|
James McCarthy
|
f3d56f1ccf
|
Removed use of Array[*roles].
|
2011-09-06 10:07:47 +02:00 |
|
Martin Rehfeld
|
25be3587cd
|
whitespace
|
2011-09-05 07:33:22 +02:00 |
|
James McCarthy
|
62687070a0
|
Fixes issue checking roles when none are initialized in the class yet.
|
2011-04-30 18:12:02 +01:00 |
|
James McCarthy
|
9660b9b43a
|
Fixes #7 RoleModel.roles is now a protected method.
|
2011-04-30 12:58:47 +01:00 |
|
Martin Rehfeld
|
604b0d5e09
|
refactoring: use .mask_for in #roles=
|
2010-10-10 15:33:59 +02:00 |
|
Martin Rehfeld
|
58e4e06bd1
|
support most Set methods on #roles
add, merge, subtract are explicitly tested
others like ^, |, &, - should work as well
|
2010-10-10 15:25:47 +02:00 |
|
Martin Rehfeld
|
9222ec0da0
|
remove explicit #to_a before re-assigning Roles
|
2010-10-10 15:06:28 +02:00 |
|
Martin Rehfeld
|
2058edaf2f
|
allow assigning Roles objects via #roles=
|
2010-10-10 15:02:20 +02:00 |
|
Daniel Gaytán
|
e62e22a459
|
Adding a method that returns the roles mask for a given array of roles
|
2010-10-07 13:35:39 -05:00 |
|
Pablo Barrios
|
2717592a7c
|
adding the ability to delete a role given as a string
|
2010-09-27 03:25:29 +08:00 |
|
Pablo Barrios
|
e2e5578d88
|
Adding a delete method to remove a simple role
|
2010-09-27 03:25:28 +08:00 |
|
Martin Rehfeld
|
7dc843f0a7
|
ensure backward compatibility
also get method and alias names right
|
2010-08-17 13:47:29 +02:00 |
|
Martin Rehfeld
|
dec40a9c14
|
whitespace and punctuation
|
2010-08-12 20:35:16 +02:00 |
|
Martin Rehfeld
|
50e6c7054f
|
Merge commit '27635154e7 ' into has_roles
draft for multi-role query methods provided by kristianmandrup
Conflicts:
lib/role_model/implementation.rb
|
2010-08-12 20:31:14 +02:00 |
|
Martin Rehfeld
|
72ffee5870
|
use alias_method instead of alias
this might be beneficial when inheriting and
re-defining methods introduced by RoleModel
|
2010-08-12 20:25:28 +02:00 |
|
Kristian Mandrup
|
27635154e7
|
added methods to check for multiple roles, any or all - also added 'drive_it' file to show how to use it - as described in README
|
2010-08-12 15:40:28 +02:00 |
|
Martin Rehfeld
|
f7f139a92e
|
provide is? alias for has_role?
this is what ryanb proposed on his implementation
|
2010-08-07 15:15:32 +02:00 |
|
Martin Rehfeld
|
2d04b3f1a5
|
remove is_a? and is_an? aliases for has_role?
these were poor names and caused conflicts
|
2010-08-04 14:16:21 +02:00 |
|
Martin Rehfeld
|
a66af17fdf
|
move instance methods into separate file
|
2010-06-04 09:18:58 +02:00 |
|
Martin Rehfeld
|
be80b7e106
|
move RoleModel::ClassMethods into separate file
|
2010-05-30 22:28:06 +02:00 |
|
Martin Rehfeld
|
35c7ed502c
|
fix another typo in comment
|
2010-05-30 22:18:53 +02:00 |
|
Martin Rehfeld
|
88601af7dd
|
alias has_role? to is_an? (in addition to is_a?)
|
2010-05-30 22:16:14 +02:00 |
|
Martin Rehfeld
|
aae5470155
|
improve RDoc documentation and fix typo in README
|
2010-05-30 22:13:44 +02:00 |
|
Martin Rehfeld
|
78cbab58b1
|
make Roles class inherit from Set instead of Array
|
2010-05-29 23:29:27 +02:00 |
|
Martin Rehfeld
|
b4159f1d82
|
alias has_role? to is_a?
|
2010-05-29 23:27:11 +02:00 |
|
Martin Rehfeld
|
7b24c29f4d
|
support adding roles with <<
|
2010-05-29 13:20:59 +02:00 |
|
Martin Rehfeld
|
11dbe76271
|
fix Ruby warning
|
2010-05-29 12:58:27 +02:00 |
|
Martin Rehfeld
|
3b6096759f
|
support inheritance of RoleModel settings
|
2010-05-25 17:27:16 +02:00 |
|
Martin Rehfeld
|
6167cee6fc
|
initial codebase
|
2010-05-25 00:13:21 +02:00 |
|
Martin Rehfeld
|
09649d08d0
|
Initial commit to role_model.
|
2010-05-24 21:50:46 +02:00 |
|