From e40fbd83596e39c19a99b13ccce04b0c43076b5c Mon Sep 17 00:00:00 2001 From: ulrich <ulrich@uhilger.de> Date: Wed, 28 Dec 2016 18:14:21 +0000 Subject: [PATCH] Anpassungen an der Gestaltung (in Arbeit) --- web/ui/ui.js | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/web/ui/ui.js b/web/ui/ui.js index 1de6543..b0ccf4e 100644 --- a/web/ui/ui.js +++ b/web/ui/ui.js @@ -272,14 +272,15 @@ }); } +// http]://example.com/um/api?c=de.uhilger.um.api.UserMgr&m=testmethode function um_apicall_grant_role(userId, roleName, isNewRole) { + var ur = new UserRole(userId, roleName); var m = 'grantRole'; var u = '../svc/' + m; $.ajax({ url: u, data: { - p1: userId, - p2: roleName + p: self.serialisieren(ur) }, type: "POST", dataType : "html", @@ -299,13 +300,13 @@ } function um_apicall_revoke_role(userId, roleName) { + var ur = new UserRole(userId, roleName); var m = 'revokeRole'; var u = '../svc/' + m; $.ajax({ url: u, data: { - p1: userId, - p2: roleName + p: self.serialisieren(ur) }, type: "POST", dataType : "html", @@ -373,4 +374,9 @@ this.firstName = fn; this.lastName = ln; this.email = em; +} + +function UserRole(u, r) { + this.userId = u; + this.role = r; } \ No newline at end of file -- Gitblit v1.9.3