Fixeda bug where the group description was not sent to the server side, which caused an exception while creating a group.
This commit is contained in:
1 parent
e5f6824304
commit
eb2ed341a2
3 files changed
+4
-1
No files matched your search
@@ -50,6 +50,8 @@ def add_group():
|
||||
|
||||
if not "name" in data:
|
||||
return make_response("Missing mandatory name field", 400)
|
||||
if not "description" in data:
|
||||
return make_response("Missing mandatory description field", 400)
|
||||
if not "permissions" in data:
|
||||
return make_response("Missing mandatory permission field", 400)
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
var data = {
|
||||
name: group.name,
|
||||
description: group.hasOwnProperty("description") ? group.description : "",
|
||||
permissions: group.hasOwnProperty("permissions") ? group.permissions : [],
|
||||
defaultOn: group.defaultOn
|
||||
};
|
||||
|
||||
@@ -284,7 +284,7 @@ $(function() {
|
||||
newValue.forEach(function(g) {
|
||||
var needs = [];
|
||||
g.permissions.forEach(function(p) {
|
||||
for (key in p.needs) {
|
||||
for (var key in p.needs) {
|
||||
p.needs[key].forEach(function(value) {
|
||||
needs.push(access.permissions.need(key, value));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user