| | |
| | | $("#nutzerrollen").append('<option value=' + rolle.String + '>' + rolle.String + '</option>'); |
| | | } |
| | | $('#nutzerRolleEntziehen').prop( "disabled", true ); |
| | | $('#rolleErteilen').prop( "disabled", true ); |
| | | } |
| | | |
| | | function um_show_role_list(resp) { |
| | |
| | | }); |
| | | } |
| | | |
| | | // 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", |
| | |
| | | } |
| | | |
| | | 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", |
| | |
| | | this.firstName = fn; |
| | | this.lastName = ln; |
| | | this.email = em; |
| | | } |
| | | |
| | | function UserRole(u, r) { |
| | | this.userId = u; |
| | | this.role = r; |
| | | } |