8000 feat: add project groups by jstarry · Pull Request #62 · bufferoverflow/verdaccio-gitlab · GitHub
[go: up one dir, main page]

Skip to content

feat: add project groups #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,25 @@ user successfully authenticated can access all packages.
#### Publish

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

For instance, assuming the following configuration:

- `auth.gitlab.publish` = `$maintainer`
- the gitlab user `sample_user` has access to group `group1` as
`$maintainer` and `group2` as `$reporter` in gitlab
`$maintainer` and `group2` as `$reporter` in gitlab and has access to project
`group3/project` as `$maintainer`
- then this user would be able to *access* any package
- *publish* any of the following npm packages in verdaccio:
- `sample_user`
- any package under `group1/**`
- error if the user tries to publish any package under `group2/**`
- `group1`
- any package under `@group1/**`
- `@group3/project`
- error if the user tries to publish any package under `@group2/**`

### Legacy Mode

Expand Down
16 changes: 8 additions & 8 deletions flow-typed/npm/express_v4.16.x.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// flow-typed signature: cc24a4e737d9dfb8e1381c3bd4ebaa65
// flow-typed version: d11eab7bb5/express_v4.16.x/flow_>=v0.32.x
// flow-typed signature: 207bac286d971cad7615b09aa20d4acf
// flow-typed version: bb849ae672/express_v4.16.x/flow_>=v0.32.x

import type { Server } from "http";
import * as http from "http";
import type { Socket } from "net";

declare type express$RouterOptions = {
Expand Down Expand Up @@ -219,15 +219,15 @@ declare class express$Application extends express$Router mixins events$EventEmit
hostname?: string,
backlog?: number,
callback?: (err?: ?Error) => mixed
): ?Server;
): ?http.Server;
listen(
port: number,
hostname?: string,
callback?: (err?: ?Error) => mixed
): ?Server;
listen(port: number, callback?: (err?: ?Error) => mixed): ?Server;
listen(path: string, callback?: (err?: ?Error) => mixed): ?Server;
listen(handle: Object, callback?: (err?: ?Error) => mixed): ?Server;
): ?http.Server;
listen(port: number, callback?: (err?: ?Error) => mixed): ?http.Server;
listen(path: string, callback?: (err?: ?Error) => mixed): ?http.Server;
listen(handle: Object, callback?: (err?: ?Error) => mixed): ?http.Server;
disable(name: string): void;
disabled(name: string): boolean;
enable(name: string): express$Application;
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/jest-environment-node_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 76121323ae40fcb28bee1398717ee06c
// flow-typed version: <<STUB>>/jest-environment-node_v22.x.x/flow_v0.69.0
// flow-typed signature: 761582d708876a473d1855b1b434f99b
// flow-typed version: <<STUB>>/jest-environment-node_v^23.4.0/flow_v0.77.0

/**
* This is an autogenerated libdef stub for:
Expand Down
107 changes: 79 additions & 28 deletions flow-typed/npm/jest_v23.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: ad251f3a3446f6ab4e6691a94e701cad
// flow-typed version: caa120caaa/jest_v23.x.x/flow_>=v0.39.x
// flow-typed signature: 78c200acffbcc16bba9478f5396c3a00
// flow-typed version: b2980740dd/jest_v23.x.x/flow_>=v0.39.x

type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
(...args: TArguments): TReturn,
Expand All @@ -17,7 +17,12 @@ type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
* An array that contains all the object instances that have been
* instantiated from this mock function.
*/
instances: Array<TReturn>
instances: Array<TReturn>,
/**
* An array that contains all the object results that have been
* returned by this mock function call
*/
results: Array<{ isThrow: boolean, value: TReturn }>
},
/**
* Resets all information stored in the mockFn.mock.calls and
Expand Down Expand Up @@ -119,7 +124,9 @@ type JestMatcherResult = {
pass: boolean
};

type JestMatcher = (actual: any, expected: any) => JestMatcherResult;
type JestMatcher = (actual: any, expected: any) =>
| JestMatcherResult
| Promise<JestMatcherResult>;

type JestPromiseType = {
/**
Expand Down Expand Up @@ -168,11 +175,16 @@ type JestStyledComponentsMatchersType = {
* Plugin: jest-enzyme
*/
type EnzymeMatchersType = {
// 5.x
toBeEmpty(): void,
toBePresent(): void,
// 6.x
toBeChecked(): void,
toBeDisabled(): void,
toBeEmpty(): void,
toBeEmptyRender(): void,
toBePresent(): void,
toContainMatchingElement(selector: string): void;
toContainMatchingElements(n: number, selector: string): void;
toContainExactlyOneMatchingElement(selector: string): void;
toContainReact(element: React$Element<any>): void,
toExist(): void,
toHaveClassName(className: string): void,
Expand All @@ -183,17 +195,32 @@ type EnzymeMatchersType = {
toHaveStyle: ((styleKey: string, styleValue?: any) => void) & ((style: Object) => void),
toHaveTagName(tagName: string): void,
toHaveText(text: string): void,
toIncludeText(text: string): void,
toHaveValue(value: any): void,
toMatchElement(element: React$Element<any>): void,
toMatchSelector(selector: string): void
toIncludeText(text: string): void,
toMatchElement(
element: React$Element<any>,
options?: {| ignoreProps?: boolean, verbose?: boolean |},
): void,
toMatchSelector(selector: string): void,
// 7.x
toHaveDisplayName(name: string): void,
};

// DOM testing library extensions https://github.com/kentcdodds/dom-testing-library#custom-jest-matchers
type DomTestingLibraryType = {
toBeDisabled(): void,
toBeEmpty(): void,
toBeInTheDocument(): void,
toBeVisible(): void,
toContainElement(element: HTMLElement | null): void,
toContainHTML(htmlText: string): void,
toHaveAttribute(name: string, expectedValue?: string): void,
toHaveClass(...classNames: string[]): void,
toHaveFocus(): void,
toHaveFormValues(expectedValues: { [name: string]: any }): void,
toHaveStyle(css: string): void,
toHaveTextContent(content: string | RegExp, options?: { normalizeWhitespace: boolean }): void,
toBeInTheDOM(): void,
toHaveTextContent(content: string): void,
toHaveAttribute(name: string, expectedValue?: string): void
};

// Jest JQuery Matchers: https://github.com/unindented/custom-jquery-matchers
Expand Down Expand Up @@ -689,11 +716,14 @@ interface JestExpectType {
/**
* This ensures that an Object matches the most recent snapshot.
*/
toMatchSnapshot(propertyMatchers?: {[key: string]: JestAsymmetricEqualityType}, name?: string): void,
toMatchSnapshot(propertyMatchers?: any, name?: string): void,
/**
* This ensures that an Object matches the most recent snapshot.
*/
toMatchSnapshot(name: string): void,

toMatchInlineSnapshot(snapshot?: string): void,
toMatchInlineSnapshot(propertyMatchers?: any, snapshot?: string): void,
/**
* Use .toThrow to test that a function throws when it is called.
* If you want to test that a specific error gets thrown, you can provide an
Expand All @@ -708,7 +738,8 @@ interface JestExpectType {
* Use .toThrowErrorMatchingSnapshot to test that a function throws a error
* matching the most recent snapshot when it is called.
*/
toThrowErrorMatchingSnapshot(): void
toThrowErrorMatchingSnapshot(): void,
toThrowErrorMatchingInlineSnapshot(snapshot?: string): void,
}

type JestObjectType = {
Expand Down Expand Up @@ -910,7 +941,20 @@ declare var describe: {
/**
* Skip running this describe block
*/
skip(name: JestTestName, fn: () => void): void
skip(name: JestTestName, fn: () => void): void,

/**
* each runs this test against array of argument arrays per each run
*
* @param {table} table of Test
*/
each(
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number
) => void,
};

/** An individual test unit */
Expand All @@ -927,17 +971,7 @@ declare var it: {
fn?: (done: () => void) => ?Promise<mixed>,
timeout?: number
): void,
/**
* each runs this test against array of argument arrays per each run
*
* @param {table} table of Test
*/
each(
table: Array<Array<mixed>>
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>
) => void,

/**
* Only run this test
*
Expand All @@ -951,12 +985,14 @@ declare var it: {
timeout?: number
): {
each(
table: Array<Array<mixed>>
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number
) => void,
},

/**
* Skip running this test
*
Expand All @@ -969,6 +1005,7 @@ declare var it: {
fn?: (done: () => void) => ?Promise<mixed>,
timeout?: number
): void,

/**
* Run the test concurrently
*
Expand All @@ -980,8 +1017,22 @@ declare var it: {
name: JestTestName,
fn?: (done: () => void) => ?Promise<mixed>,
timeout?: number
): void
): void,

/**
* each runs this test against array of argument arrays per each run
*
* @param {table} table of Test
*/
each(
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number
) => void,
};

declare function fit(
name: JestTestName,
fn: (done: () => void) => ?Promise<mixed>,
Expand Down
11 changes: 9 additions & 2 deletions flow-typed/npm/request_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: fce684fdcdf9c74363f2c0bf136dbf88
// flow-typed version: <<STUB>>/request_v2.83.0/flow_v0.64.0
// flow-typed signature: e8552b9b1229d66b449132fa75772770
// flow-typed version: <<STUB>>/request_v^2.88.0/flow_v0.77.0

/**
* This is an autogenerated libdef stub for:
Expand Down Expand Up @@ -38,6 +38,10 @@ declare module 'request/lib/har' {
declare module.exports: any;
}

declare module 'request/lib/hawk' {
declare module.exports: any;
}

declare module 'request/lib/helpers' {
declare module.exports: any;
}
Expand Down Expand Up @@ -85,6 +89,9 @@ declare module 'request/lib/getProxyFromURI.js' {
declare module 'request/lib/har.js' {
declare module.exports: $Exports<'request/lib/har'>;
}
declare module 'request/lib/hawk.js' {
declare module.exports: $Exports<'request/lib/hawk'>;
}
declare module 'request/lib/helpers.js' {
declare module.exports: $Exports<'request/lib/helpers'>;
}
Expand Down
Loading
0