Skip to content

Commit fcc04f9

Browse files
committed
fix edit role mappings in oauth
1 parent 9197831 commit fcc04f9

9 files changed

Lines changed: 23 additions & 12 deletions

File tree

OpenFlow/src/public/Controllers.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,6 +4021,7 @@ export class OAuthClientCtrl extends entityCtrl<Base> {
40214021
searchSelectedItem: TokenUser = null;
40224022
searchtext: string = "";
40234023
e: any = null;
4024+
public rolemappings: any;
40244025
constructor(
40254026
public $scope: ng.IScope,
40264027
public $location: ng.ILocationService,
@@ -4078,14 +4079,16 @@ export class OAuthClientCtrl extends entityCtrl<Base> {
40784079
addrolemapping(name: string, value: string) {
40794080
if (name == null || name == "") return false;
40804081
if (value == null || value == "") return false;
4082+
console.log(name, value);
40814083
if (!this.model["rolemappings"]) this.model["rolemappings"] = {};
4082-
this.model["rolemappings"]["name"] = value;
4084+
this.model["rolemappings"][name] = value;
40834085
if (!this.$scope.$$phase) { this.$scope.$apply(); }
40844086
}
40854087
deleterolemapping(name) {
4088+
console.log(name);
40864089
if (name == null || name == "") return false;
40874090
if (!this.model["rolemappings"]) this.model["rolemappings"] = {};
4088-
delete this.model["rolemappings"]["name"];
4091+
delete this.model["rolemappings"][name];
40894092
if (!this.$scope.$$phase) { this.$scope.$apply(); }
40904093
}
40914094
CopySecret(field) {

OpenFlow/src/public/OAuthClient.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,19 @@ <h1 class="pagetitle" translate lib="web">oauthclient</h1>
7979
<div class="form-group">
8080
<label for="rolemappings" class="col-sm-2 control-label" translate lib="web">rolemappings</label>
8181
<table style="width: 50%;" class="table table-striped">
82-
<tr ng-repeat="key in ctrl.model.rolemappings">
82+
<thead>
83+
<tr>
84+
<th></th>
85+
<th><b translate lib="web">openflow role</b></th>
86+
<th><b translate lib="web">target role</b></th>
87+
<th></th>
88+
</tr>
89+
</thead>
90+
<tr ng-repeat="(key, value) in ctrl.model.rolemappings">
8391
<td style="width: 15px;"></td>
8492
<td>{{ key }}</td>
85-
<td>{{ (ctrl.model.rolemappings[key]) }}</td>
86-
<td><a href="" ng-click="ctrl.deletefromarray('rolemappings', id)" translate lib="web">delete</a></td>
93+
<td>{{ value }}</td>
94+
<td><a href="" ng-click="ctrl.deleterolemapping(key)" translate lib="web">delete</a></td>
8795
</tr>
8896
</table>
8997
</div>

OpenFlowNodeRED/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openflow-nodered",
3-
"version": "1.1.56",
3+
"version": "1.1.57",
44
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
55
"main": "index.js",
66
"scripts": {

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.56
1+
1.1.57

docker-compose-toolbox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ services:
8282
- "traefik.http.routers.nodered.rule=Host(`nodered1.toolbox.openrpa.dk`)"
8383
- "traefik.http.routers.nodered.entrypoints=web"
8484
- "traefik.http.services.nodered.loadbalancer.server.port=1880"
85-
image: "cloudhack/openflownodered:1.1.56"
85+
image: "cloudhack/openflownodered:1.1.57"
8686
container_name: "nodered"
8787
environment:
8888
# - nodered_id=1

docker-compose-traefik-letsencrypt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ services:
107107
- "traefik.http.routers.nodered.entrypoints=web,websecure"
108108
- "traefik.http.services.nodered.loadbalancer.server.port=1880"
109109
- "traefik.http.routers.nodered.tls.certresolver=myresolver"
110-
image: "cloudhack/openflownodered:1.1.56"
110+
image: "cloudhack/openflownodered:1.1.57"
111111
container_name: "nodered"
112112
environment:
113113
# - nodered_id=1

docker-compose-traefik.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ services:
8282
- "traefik.http.routers.nodered.rule=Host(`nodered1.localhost.openrpa.dk`)"
8383
- "traefik.http.routers.nodered.entrypoints=web"
8484
- "traefik.http.services.nodered.loadbalancer.server.port=1880"
85-
image: "cloudhack/openflownodered:1.1.56"
85+
image: "cloudhack/openflownodered:1.1.57"
8686
container_name: "nodered"
8787
environment:
8888
# - nodered_id=1

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ services:
5252
- "80:80"
5353
- "5858:5858"
5454
nodered:
55-
image: "cloudhack/openflownodered:1.1.56"
55+
image: "cloudhack/openflownodered:1.1.57"
5656
environment:
5757
# - nodered_id=1
5858
- nodered_sa=nodered1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openiap",
3-
"version": "1.1.56",
3+
"version": "1.1.57",
44
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)