diff --git a/scm-ui/src/repos/permissions/components/PermissionCheckbox.js b/scm-ui/src/repos/permissions/components/PermissionCheckbox.js new file mode 100644 index 0000000000..e527de832b --- /dev/null +++ b/scm-ui/src/repos/permissions/components/PermissionCheckbox.js @@ -0,0 +1,27 @@ +// @flow +import React from "react"; +import { translate } from "react-i18next"; +import { Checkbox } from "@scm-manager/ui-components"; + +type Props = { + t: (string) => string, + name: string, + checked: boolean, + onChange?: (value: boolean, name?: string) => void +}; + +class PermissionCheckbox extends React.Component { + render() { + const { t } = this.props; + return (); + } +} + +export default translate("plugins")(PermissionCheckbox); diff --git a/scm-ui/src/repos/permissions/containers/AdvancedPermissionsDialog.js b/scm-ui/src/repos/permissions/containers/AdvancedPermissionsDialog.js index 7c7e4186fa..41eb4c4743 100644 --- a/scm-ui/src/repos/permissions/containers/AdvancedPermissionsDialog.js +++ b/scm-ui/src/repos/permissions/containers/AdvancedPermissionsDialog.js @@ -1,8 +1,9 @@ // @flow import React from "react"; -import { Button, Checkbox, SubmitButton } from "@scm-manager/ui-components"; +import { Button, SubmitButton } from "@scm-manager/ui-components"; import { translate } from "react-i18next"; +import PermissionCheckbox from "../components/PermissionCheckbox"; type Props = { availableVerbs: string[], @@ -35,10 +36,8 @@ class AdvancedPermissionsDialog extends React.Component { const { verbs } = this.state; const verbSelectBoxes = Object.entries(verbs).map(e => ( - diff --git a/scm-webapp/src/main/resources/locales/en/plugins.json b/scm-webapp/src/main/resources/locales/en/plugins.json index 7c75539005..67f26115dc 100644 --- a/scm-webapp/src/main/resources/locales/en/plugins.json +++ b/scm-webapp/src/main/resources/locales/en/plugins.json @@ -37,5 +37,45 @@ } }, "unknown": "Unknown permission" + }, + "verbs": { + "repository": { + "read": { + "displayName": "read", + "description": "May see the repository inside the SCM-Manager" + }, + "modify": { + "displayName": "modify", + "description": "May modify the properties of the repository" + }, + "delete": { + "displayName": "delete", + "description": "May delete the repository" + }, + "pull": { + "displayName": "pull/checkout", + "description": "May pull/checkout the repository" + }, + "push": { + "displayName": "push/commit", + "description": "May change the content of the repository (push/commit)" + }, + "permissionRead": { + "displayName": "read permissions", + "description": "May see the permissions of the repository" + }, + "permissionWrite": { + "displayName": "modify permissions", + "description": "May modify the permissions of the repository" + }, + "healthCheck": { + "displayName": "health check", + "description": "May run the health check for the repository" + }, + "*": { + "displayName": "overall", + "description": "May change everything for the repository (includes all other permissions)" + } + } } }