diff --git a/.wappler/targets/Development/app/config/config.json b/.wappler/targets/Development/app/config/config.json
index 00bfe1c..48d79c6 100644
--- a/.wappler/targets/Development/app/config/config.json
+++ b/.wappler/targets/Development/app/config/config.json
@@ -6,6 +6,6 @@
"methods": "GET,POST,DELETE,PATCH,PUT"
},
"env": {
- "API_BASEURL": "http://vapor.prelub.com/api/v1.0/"
+ "API_BASEURL": "http://localhost:8080/api/v1.0/"
}
}
\ No newline at end of file
diff --git a/app/api/security/defalutadminapi.json b/app/api/security/defalutadminapi.json
index ccfdb35..2ba1842 100644
--- a/app/api/security/defalutadminapi.json
+++ b/app/api/security/defalutadminapi.json
@@ -117,6 +117,172 @@
"if": "{{gettheuser}}",
"then": {
"steps": [
+ {
+ "name": "api",
+ "module": "api",
+ "action": "send",
+ "options": {
+ "url": "{{$_ENV.API_BASEURL+'users/'+gettheuser.id}}",
+ "schema": [
+ {
+ "type": "object",
+ "name": "data",
+ "sub": [
+ {
+ "type": "number",
+ "name": "id"
+ },
+ {
+ "type": "text",
+ "name": "lastname"
+ },
+ {
+ "type": "text",
+ "name": "updatedate"
+ },
+ {
+ "type": "number",
+ "name": "updateuserid"
+ },
+ {
+ "type": "boolean",
+ "name": "isactive"
+ },
+ {
+ "type": "text",
+ "name": "password"
+ },
+ {
+ "type": "text",
+ "name": "createdate"
+ },
+ {
+ "type": "text",
+ "name": "username"
+ },
+ {
+ "type": "text",
+ "name": "email"
+ },
+ {
+ "type": "text",
+ "name": "firstname"
+ },
+ {
+ "type": "number",
+ "name": "createuserid"
+ },
+ {
+ "type": "array",
+ "name": "roles"
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "name": "headers",
+ "sub": [
+ {
+ "type": "text",
+ "name": "connection"
+ },
+ {
+ "type": "text",
+ "name": "content-length"
+ },
+ {
+ "type": "text",
+ "name": "content-type"
+ },
+ {
+ "type": "text",
+ "name": "date"
+ }
+ ]
+ }
+ ]
+ },
+ "output": true,
+ "meta": [
+ {
+ "type": "object",
+ "name": "data",
+ "sub": [
+ {
+ "type": "number",
+ "name": "id"
+ },
+ {
+ "type": "text",
+ "name": "lastname"
+ },
+ {
+ "type": "text",
+ "name": "updatedate"
+ },
+ {
+ "type": "number",
+ "name": "updateuserid"
+ },
+ {
+ "type": "boolean",
+ "name": "isactive"
+ },
+ {
+ "type": "text",
+ "name": "password"
+ },
+ {
+ "type": "text",
+ "name": "createdate"
+ },
+ {
+ "type": "text",
+ "name": "username"
+ },
+ {
+ "type": "text",
+ "name": "email"
+ },
+ {
+ "type": "text",
+ "name": "firstname"
+ },
+ {
+ "type": "number",
+ "name": "createuserid"
+ },
+ {
+ "type": "array",
+ "name": "roles"
+ }
+ ]
+ },
+ {
+ "type": "object",
+ "name": "headers",
+ "sub": [
+ {
+ "type": "text",
+ "name": "connection"
+ },
+ {
+ "type": "text",
+ "name": "content-length"
+ },
+ {
+ "type": "text",
+ "name": "content-type"
+ },
+ {
+ "type": "text",
+ "name": "date"
+ }
+ ]
+ }
+ ],
+ "outputType": "object"
+ },
{
"name": "insertuser",
"module": "api",
@@ -263,7 +429,7 @@
"operator": "equal",
"type": "expression",
"name": ":P1",
- "value": "{{$_GET.id}}",
+ "value": "{{insertuser.data.id}}",
"test": ""
}
],
@@ -280,7 +446,7 @@
"field": "xuserrole.userid",
"type": "double",
"operator": "equal",
- "value": "{{$_GET.id}}",
+ "value": "{{insertuser.data.id}}",
"data": {
"table": "xuserrole",
"column": "userid",
@@ -354,6 +520,10 @@
{
"name": "roleid",
"type": "number"
+ },
+ {
+ "name": "addrole",
+ "type": "text"
}
],
"outputType": "array"
diff --git a/app/config/config.json b/app/config/config.json
index 00bfe1c..48d79c6 100644
--- a/app/config/config.json
+++ b/app/config/config.json
@@ -6,6 +6,6 @@
"methods": "GET,POST,DELETE,PATCH,PUT"
},
"env": {
- "API_BASEURL": "http://vapor.prelub.com/api/v1.0/"
+ "API_BASEURL": "http://localhost:8080/api/v1.0/"
}
}
\ No newline at end of file
diff --git a/data/authdb.sqlite3 b/data/authdb.sqlite3
index 9cf4aaa..105eead 100644
Binary files a/data/authdb.sqlite3 and b/data/authdb.sqlite3 differ
diff --git a/views/wadmin/usermanage.ejs b/views/wadmin/usermanage.ejs
index 184673b..6ad8d8e 100644
--- a/views/wadmin/usermanage.ejs
+++ b/views/wadmin/usermanage.ejs
@@ -9,7 +9,7 @@