mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-04-01 02:42:23 -05:00
hotfix: auth groups didn't work correctly
This commit is contained in:
parent
c43846f14e
commit
19b1d76e98
2 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
|||
|
||||
14 Sep 2014, version 0.10.1
|
||||
14 Sep 2014, version 0.10.2
|
||||
|
||||
- hotfix: added missing dependency - `rimraf`
|
||||
- hotfix: auth groups didn't work correctly
|
||||
|
||||
14 Sep 2014, version 0.10.0
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ function Config(config) {
|
|||
function allow_action(package, who, action) {
|
||||
return (this.get_package_setting(package, action) || []).reduce(function(prev, curr) {
|
||||
if (typeof(who) === 'string' && curr === who) return true
|
||||
if (Array.isArray(who) && who.indexOf(curr) !== -1) return true
|
||||
if (Array.isArray(who.groups) && who.groups.indexOf(curr) !== -1) return true
|
||||
return prev
|
||||
}, false)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue