-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'role-assign-collection'
# Conflicts: # History.md # package.js
- Loading branch information
Showing
53 changed files
with
5,201 additions
and
13,446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"include": [ | ||
"**/packages/roles/**/*", | ||
"**/packages/*alanning_roles.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,8 @@ results | |
npm-debug.log | ||
smart.lock | ||
|
||
.idea | ||
.idea | ||
docs/ | ||
node_modules/ | ||
.npm/ | ||
someapp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[email protected] | ||
[email protected] | ||
alanning:[email protected].0 | ||
alanning:[email protected].1 | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
|
@@ -26,7 +26,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
local-test:alanning:[email protected].0 | ||
local-test:alanning:[email protected].1 | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ those roles easier. | |
<a id="roles-naming" name="roles-naming"></a> | ||
### Permissions vs roles (or What's in a name...) | ||
|
||
Although the name of this package is `roles`, you can define your **roles**, **groups** or **permissions** however you like. | ||
Although the name of this package is `roles`, you can define your **roles**, **scopes** or **permissions** however you like. | ||
They are essentially just tags that you assign to a user and which you can check upon later. | ||
|
||
You can have traditional roles like, `admin` or `webmaster`, or you can assign more granular permissions such | ||
|
@@ -212,7 +212,7 @@ var users = [ | |
{name:"Admin User",email:"[email protected]",roles:['admin']} | ||
]; | ||
|
||
_.each(users, function (user) { | ||
users.forEach(function (user) { | ||
var id; | ||
|
||
id = Accounts.createUser({ | ||
|
@@ -222,7 +222,7 @@ _.each(users, function (user) { | |
}); | ||
|
||
if (user.roles.length > 0) { | ||
_.each(user.roles, function (role) { | ||
user.roles.forEach(function (role) { | ||
Roles.createRole(role, {unlessExists: true}); | ||
}); | ||
// Need _id of existing user record so this call must come after `Accounts.createUser`. | ||
|
@@ -245,7 +245,7 @@ Check user roles before publishing sensitive data: | |
```js | ||
// server/publish.js | ||
|
||
// Give authorized users access to sensitive data by group | ||
// Give authorized users access to sensitive data by scope | ||
Meteor.publish('secrets', function (scope) { | ||
check(scope, String); | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.