8000 Merge pull request #62 from jstarry/project-groups · bufferoverflow/verdaccio-gitlab@da9aba8 · GitHub
[go: up one dir, main page]

Skip to content

Commit da9aba8

Browse files
authored
Merge pull request #62 from jstarry/project-groups
feat: add project groups
2 parents 5b6cf94 + cb13b62 commit da9aba8

14 files changed

+1424
-106
lines changed

README.md

+10Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,25 @@ user successfully authenticated can access all packages.
117117
#### Publish
118118

119119
*publish* is allowed if the package name matches the logged in user
120-
id, or if the package name or scope of the package matches one of the
120+
id, if the package name or scope of the package matches one of the
121121
user's groups, and the user has `auth.gitlab.publish` access rights on
122-
the group
122+
the group, or if the package name (possibly scoped) matches on the user's
123+
projects, and the user has `auth.gitlab.publish` access rights on
124+
the project.
123125

124126
For instance, assuming the following configuration:
125127

126128
- `auth.gitlab.publish` = `$maintainer`
127129
- the gitlab user `sample_user` has access to group `group1` as
128-
`$maintainer` and `group2` as `$reporter` in gitlab
130+
`$maintainer` and `group2` as `$reporter` in gitlab and has access to project
131+
`group3/project` as `$maintainer`
129132
- then this user would be able to *access* any package
130133
- *publish* any of the following npm packages in verdaccio:
131134
- `sample_user`
132-
- any package under `group1/**`
133-
- error if the user tries to publish any package under `group2/**`
135+
- `group1`
136+
- any package under `@group1/**`
137+
- `@group3/project`
138+
- error if the user tries to publish any package under `@group2/**`
134139

135140
### Legacy Mode
136141

flow-typed/npm/express_v4.16.x.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// flow-typed signature: cc24a4e737d9dfb8e1381c3bd4ebaa65
2-
// flow-typed version: d11eab7bb5/express_v4.16.x/flow_>=v0.32.x
1+
// flow-typed signature: 207bac286d971cad7615b09aa20d4acf
2+
// flow-typed version: bb849ae672/express_v4.16.x/flow_>=v0.32.x
33

4-
import type { Server } from "http";
4+
import * as http from "http";
55
import type { Socket } from "net";
66

77
declare type express$RouterOptions = {
@@ -219,15 +219,15 @@ declare class express$Application extends express$Router mixins events$EventEmit
219219
hostname?: string,
220220
backlog?: number,
221221
callback?: (err?: ?Error) => mixed
222-
): ?Server;
222+
): ?http.Server;
223223
listen(
224224
port: number,
225225
hostname?: string,
226226
callback?: (err?: ?Error) => mixed
227-
): ?Server;
228-
listen(port: number, callback?: (err?: ?Error) => mixed): ?Server;
229-
listen(path: string, callback?: (err?: ?Error) => mixed): ?Server;
230-
listen(handle: Object, callback?: (err?: ?Error) => mixed): ?Server;
227+
): ?http.Server;
228+
listen(port: number, callback?: (err?: ?Error) => mixed): ?http.Server;
229+
listen(path: string, callback?: (err?: ?Error) => mixed): ?http.Server;
230+
listen(handle: Object, callback?: (err?: ?Error) => mixed): ?http.Server;
231231
disable(name: string): void;
232232
disabled(name: string): boolean;
233233
enable(name: string): express$Application;

flow-typed/npm/jest-environment-node_vx.x.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 76121323ae40fcb28bee1398717ee06c
2-
// flow-typed version: <<STUB>>/jest-environment-node_v22.x.x/flow_v0.69.0
1+
// flow-typed signature: 761582d708876a473d1855b1b434f99b
2+
// flow-typed version: <<STUB>>/jest-environment-node_v^23.4.0/flow_v0.77.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/jest_v23.x.x.js

Lines changed: 79 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: ad251f3a3446f6ab4e6691a94e701cad
2-
// flow-typed version: caa120caaa/jest_v23.x.x/flow_>=v0.39.x
1+
// flow-typed signature: 78c200acffbcc16bba9478f5396c3a00
2+
// flow-typed version: b2980740dd/jest_v23.x.x/flow_>=v0.39.x
33

44
type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
55
(...args: TArguments): TReturn,
@@ -17,7 +17,12 @@ type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
1717
* An array that contains all the object instances that have been
1818
* instantiated from this mock function.
1919
*/
20-
instances: Array<TReturn>
20+
instances: Array<TReturn>,
21+
/**
22+
* An array that contains all the object results that have been
23+
* returned by this mock function call
24+
*/
25+
results: Array<{ isThrow: boolean, value: TReturn }>
2126
},
2227
/**
2328
* Resets all information stored in the mockFn.mock.calls and
@@ -119,7 +124,9 @@ type JestMatcherResult = {
119124
pass: boolean
120125
};
121126

122-
type JestMatcher = (actual: any, expected: any) => JestMatcherResult;
127+
type JestMatcher = (actual: any, expected: any) =>
128+
| JestMatcherResult
129+
| Promise<JestMatcherResult>;
123130

124131
type JestPromiseType = {
125132
/**
@@ -168,11 +175,16 @@ type JestStyledComponentsMatchersType = {
168175
* Plugin: jest-enzyme
169176
*/
170177
type EnzymeMatchersType = {
178+
// 5.x
179+
toBeEmpty(): void,
180+
toBePresent(): void,
181+
// 6.x
171182
toBeChecked(): void,
172183
toBeDisabled(): void,
173-
toBeEmpty(): void,
174184
toBeEmptyRender(): void,
175-
toBePresent(): void,
185+
toContainMatchingElement(selector: string): void;
186+
toContainMatchingElements(n: number, selector: string): void;
187+
toContainExactlyOneMatchingElement(selector: string): void;
176188
toContainReact(element: React$Element<any>): void,
177189
toExist(): void,
178190
toHaveClassName(className: string): void,
@@ -183,17 +195,32 @@ type EnzymeMatchersType = {
183195
toHaveStyle: ((styleKey: string, styleValue?: any) => void) & ((style: Object) => void),
184196
toHaveTagName(tagName: string): void,
185197
toHaveText(text: string): void,
186-
toIncludeText(text: string): void,
187198
toHaveValue(value: any): void,
188-
toMatchElement(element: React$Element<any>): void,
189-
toMatchSelector(selector: string): void
199+
toIncludeText(text: string): void,
200+
toMatchElement(
201+
element: React$Element<any>,
202+
options?: {| ignoreProps?: boolean, verbose?: boolean |},
203+
): void,
204+
toMatchSelector(selector: string): void,
205+
// 7.x
206+
toHaveDisplayName(name: string): void,
190207
};
191208

192209
// DOM testing library extensions https://github.com/kentcdodds/dom-testing-library#custom-jest-matchers
193210
type DomTestingLibraryType = {
211+
toBeDisabled(): void,
212+
toBeEmpty(): void,
213+
toBeInTheDocument(): void,
214+
toBeVisible(): void,
215+
toContainElement(element: HTMLElement | null): void,
216+
toContainHTML(htmlText: string): void,
217+
toHaveAttribute(name: string, expectedValue?: string): void,
218+
toHaveClass(...classNames: string[]): void,
219+
toHaveFocus(): void,
220+
toHaveFormValues(expectedValues: { [name: string]: any }): void,
221+
toHaveStyle(css: string): void,
222+
toHaveTextContent(content: string | RegExp, options?: { normalizeWhitespace: boolean }): void,
194223
toBeInTheDOM(): void,
195-
toHaveTextContent(content: string): void,
196-
toHaveAttribute(name: string, expectedValue?: string): void
197224
};
198225

199226
// Jest JQuery Matchers: https://github.com/unindented/custom-jquery-matchers
@@ -689,11 +716,14 @@ interface JestExpectType {
689716
/**
690717
* This ensures that an Object matches the most recent snapshot.
691718
*/
692-
toMatchSnapshot(propertyMatchers?: {[key: string]: JestAsymmetricEqualityType}, name?: string): void,
719+
toMatchSnapshot(propertyMatchers?: any, name?: string): void,
693720
/**
694721
* This ensures that an Object matches the most recent snapshot.
695722
*/
696723
toMatchSnapshot(name: string): void,
724+
725+
toMatchInlineSnapshot(snapshot?: string): void,
726+
toMatchInlineSnapshot(propertyMatchers?: any, snapshot?: string): void,
697727
/**
698728
* Use .toThrow to test that a function throws when it is called.
699729
* If you want to test that a specific error gets thrown, you can provide an
@@ -708,7 +738,8 @@ interface JestExpectType {
708738
* Use .toThrowErrorMatchingSnapshot to test that a function throws a error
709739
* matching the most recent snapshot when it is called.
710740
*/
711-
toThrowErrorMatchingSnapshot(): void
741+
toThrowErrorMatchingSnapshot(): void,
742+
toThrowErrorMatchingInlineSnapshot(snapshot?: string): void,
712743
}
713744

714745
type JestObjectType = {
@@ -910,7 +941,20 @@ declare var describe: {
910941
/**
911942
* Skip running this describe block
912943
*/
913-
skip(name: JestTestName, fn: () => void): void
944+
skip(name: JestTestName, fn: () => void): void,
945+
946+
/**
947+
* each runs this test against array of argument arrays per each run
948+
*
949+
* @param {table} table of Test
950+
*/
951+
each(
952+
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
953+
): (
954+
name: JestTestName,
955+
fn?: (...args: Array<any>) => ?Promise<mixed>,
956+
timeout?: number
957+
) => void,
914958
};
915959

916960
/** An individual test unit */
@@ -927,17 +971,7 @@ declare var it: {
927971
fn?: (done: () => void) => ?Promise<mixed>,
928972
timeout?: number
929973
): void,
930-
/**
931-
* each runs this test against array of argument arrays per each run
932-
*
933-
* @param {table} table of Test
934-
*/
935-
each(
936-
table: Array<Array<mixed>>
937-
): (
938-
name: JestTestName,
939-
fn?: (...args: Array<any>) => ?Promise<mixed>
940-
) => void,
974+
941975
/**
942976
* Only run this test
943977
*
@@ -951,12 +985,14 @@ declare var it: {
951985
timeout?: number
952986
): {
953987
each(
954-
table: Array<Array<mixed>>
988+
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
955989
): (
956990
name: JestTestName,
957-
fn?: (...args: Array<any>) => ?Promise<mixed>
991+
fn?: (...args: Array<any>) => ?Promise<mixed>,
992+
timeout?: number
958993
) => void,
959994
},
995+
960996
/**
961997
* Skip running this test
962998
*
@@ -969,6 +1005,7 @@ declare var it: {
9691005
fn?: (done: () => void) => ?Promise<mixed>,
9701006
timeout?: number
9711007
): void,
1008+
9721009
/**
9731010
* Run the test concurrently
9741011
*
@@ -980,8 +1017,22 @@ declare var it: {
9801017
name: JestTestName,
9811018
fn?: (done: () => void) => ?Promise<mixed>,
9821019
timeout?: number
983-
): void
1020+
): void,
1021+
1022+
/**
1023+
* each runs this test against array of argument arrays per each run
1024+
*
1025+
* @param {table} table of Test
1026+
*/
1027+
each(
1028+
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
1029+
): (
1030+
name: JestTestName,
1031+
fn?: (...args: Array<any>) => ?Promise<mixed>,
1032+
timeout?: number
1033+
) => void,
9841034
};
1035+
9851036
declare function fit(
9861037
name: JestTestName,
9871038
fn: (done: () => void) => ?Promise<mixed>,

flow-typed/npm/request_vx.x.x.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: fce684fdcdf9c74363f2c0bf136dbf88
2-
// flow-typed version: <<STUB>>/request_v2.83.0/flow_v0.64.0
1+
// flow-typed signature: e8552b9b1229d66b449132fa75772770
2+
// flow-typed version: <<STUB>>/request_v^2.88.0/flow_v0.77.0
33

44
/**
55
* This is an autogenerated libdef stub for:
@@ -38,6 +38,10 @@ declare module 'request/lib/har' {
3838
declare module.exports: any;
3939
}
4040

41+
declare module 'request/lib/hawk' {
42+
declare module.exports: any;
43+
}
44+
4145
declare module 'request/lib/helpers' {
4246
declare module.exports: any;
4347
}
@@ -85,6 +89,9 @@ declare module 'request/lib/getProxyFromURI.js' {
8589
declare module 'request/lib/har.js' {
8690
declare module.exports: $Exports<'request/lib/har'>;
8791
}
92+
declare module 'request/lib/hawk.js' {
93+
declare module.exports: $Exports<'request/lib/hawk'>;
94+
}
8895
declare module 'request/lib/helpers.js' {
8996
declare module.exports: $Exports<'request/lib/helpers'>;
9097
}

0 commit comments

Comments
 (0)
0