File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,24 @@ describe('Gitlab Auth Plugin Unit Tests', () => {
92
92
verdaccioGitlab . allow_access ( config . remoteUser , _package , cb ) ;
93
93
} ) ;
94
94
95
+ test ( 'should allow access to package when access level is empty (default = $all)' , done => {
96
+ const verdaccioGitlab : VerdaccioGitlab = new VerdaccioGitlab ( config . verdaccioGitlabConfig , config . options ) ;
97
+ const _package : VerdaccioGitlabPackageAccess = {
98
+ name : config . user ,
99
+ access : undefined ,
100
+ gitlab : true
101
+ } ;
102
+
103
+ const cb : Callback = ( err , data ) => {
104
+ expect ( err ) . toBeFalsy ( ) ;
105
+ // false allows the plugin chain to continue
106
+ expect ( data ) . toBe ( true ) ;
107
+ done ( ) ;
108
+ } ;
109
+
110
+ verdaccioGitlab . allow_access ( config . remoteUser , _package , cb ) ;
111
+ } ) ;
112
+
95
113
test ( 'should deny access to package based on unauthenticated' , done => {
96
114
const verdaccioGitlab : VerdaccioGitlab = new VerdaccioGitlab ( config . verdaccioGitlabConfig , config . options ) ;
97
115
const unauthenticatedUser : RemoteUser = {
You can’t perform that action at this time.
0 commit comments