To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit d02bedf8 authored by Hermann's avatar Hermann
Browse files

Hotifxes for Permission Editing

parent e9d19d21
......@@ -18,7 +18,7 @@
"@material/drawer": "^0.30.0",
"@material/select": "^0.35.1",
"ajv": "^5.5.0",
"amiv-web-ui-components": "git+https://git@gitlab.ethz.ch/amiv/web-ui-components.git#9ff18ff584dca8282fce81ae8ace97a9dd1cbd98",
"amiv-web-ui-components": "git+https://git@gitlab.ethz.ch/amiv/web-ui-components.git#1aaa2b64a6c3de07c67ddb7d1775ce0998e7997c",
"axios": "^0.17.1",
"client-oauth2": "^4.2.0",
"mithril": "^1.1.6",
......
......@@ -55,11 +55,11 @@ class PermissionEditor {
options: ['no permission', 'read', 'readwrite'],
default: 'no permission',
style: { width: '200px' },
onChange: ({ newVal }) => {
if (newVal === 'no permission') {
onChange({ value }) {
if (value === 'no permission') {
// the api equivalent to no permission is to delete the key out of the dict
if (internalPerm[apiEndpoint.href]) delete internalPerm[apiEndpoint.href];
} else internalPerm[apiEndpoint.href] = newVal;
} else internalPerm[apiEndpoint.href] = value;
onChange(internalPerm);
},
value: internalPerm[apiEndpoint.href],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment