forked from openiap/opencore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntity.html
More file actions
178 lines (166 loc) · 8.74 KB
/
Copy pathEntity.html
File metadata and controls
178 lines (166 loc) · 8.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<div class="row">
<div class="col-sm-20">
<h1 class="pagetitle"><span translate lib="web">detailsfor</span> {{ctrl.model.name}}</h1>
</div>
</div>
<style type="text/css">
.list-group-item:hover {
color: #337ab7;
text-shadow: 0 0 1em #337ab7;
cursor: pointer;
}
.listgroupitemselected {
border: 6px;
border-color: black;
background-color: #337ab7;
color: white;
cursor: pointer;
}
textarea {
border: 0 none white;
overflow: hidden;
padding: 0;
outline: none;
background-color: #D0D0D0;
}
textarea.form-control {
min-height: unset !important;
}
.secret {
-webkit-text-security: disc;
}
</style>
<button ng-click="showPerm = !showPerm" class="btn ">Access Control List</button>
<div ng-show="showPerm">
<div class="form-inline">
<label for="add" class="col-sm-1 control-label" translate lib="web">add</label>
<div class="col-sm-6 input-group" id="addusergroup">
<input type="text" name="user" id="user" ng-model="ctrl.searchtext" ng-keyup="ctrl.setkey($event)"
class="form-control" ng-model-options="{ debounce: 500 }" ng-change="ctrl.handlefilter()"
ng-keypress="ctrl.restrictInput($event)" autocomplete="off" />
<button ng-click="ctrl.adduser()" type="button"
ng-disabled="ctrl.loading==true || ctrl.searchSelectedItem==null" class="btn btn-success " translate
lib="web">add</button>
</div>
</div>
<div>
<div class="col-sm-2"></div>
<div class="col-sm-6">
<ul class="list-group">
<li class="list-group-item" ng-repeat="item in ctrl.searchFilteredList"
ng-click="ctrl.fillTextbox(item.name)"
ng-class="{listgroupitemselected: ctrl.searchSelectedItem._id==item._id}">
({{item._type}}) {{item.name}} <span ng-show="item.name != item.username">{{" " + item.username}}</span>
</li>
</ul>
</div>
</div>
<section ng-repeat="ace in ctrl.model._acl" ng-show="ctrl.collection!='files'" id="entitypermissions">
<div class="form-inline">
<label class="col-sm-4 control-label">{{ace.name}}: </label>
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 1)"
ng-click="ctrl.toogleBit(ace, 1)" value="1" id="{{ace._id}}" /> create
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 2)"
ng-click="ctrl.toogleBit(ace, 2)" value="2" id="{{ace._id}}" /> read
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 3)"
ng-click="ctrl.toogleBit(ace, 3)" value="3" id="{{ace._id}}" /> update
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 4)"
ng-click="ctrl.toogleBit(ace, 4)" value="4" id="{{ace._id}}" /> delete
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 5)"
ng-click="ctrl.toogleBit(ace, 5)" value="5" id="{{ace._id}}" /> invoke
<button type="button" ng-click="ctrl.removeuser(ace._id)" ng-disabled="ctrl.loading" translate
lib="web">delete</button>
</div>
</section>
<section ng-repeat="ace in ctrl.model.metadata._acl" ng-show="ctrl.collection=='files'">
<div class="form-group">
<div class="col-sm-9 input-group">
<label class="col-sm-3 control-label">{{ace.name}}: </label>
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 1)"
ng-click="ctrl.toogleBit(ace, 1)" value="1" id="{{ace._id}}" /> create
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 2)"
ng-click="ctrl.toogleBit(ace, 2)" value="2" id="{{ace._id}}" /> read
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 3)"
ng-click="ctrl.toogleBit(ace, 3)" value="3" id="{{ace._id}}" /> update
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 4)"
ng-click="ctrl.toogleBit(ace, 4)" value="4" id="{{ace._id}}" /> delete
<input ng-disabled="ctrl.loading==true" type="checkbox" ng-checked="ctrl.isBitSet(ace.rights, 5)"
ng-click="ctrl.toogleBit(ace, 5)" value="5" id="{{ace._id}}" /> invoke
<button type="button" ng-click="ctrl.removeuser(ace._id)" ng-disabled="ctrl.loading" translate
lib="web">delete</button>
</div>
</div>
</section>
</div>
<pre ng-show="ErrorMessage!=null" class=" alert alert-danger" role="alert">{{ ErrorMessage }}</pre>
<div ng-show="ctrl.errormessage != ''"" class=" alert alert-danger" role="alert">{{ctrl.errormessage}}</div>
<pre>{{ctrl.message}}</pre>
<a href="" ng-hide="ctrl.showjson==true" ng-click="ctrl.togglejson()" translate lib="web"
id="enableshowjson">showjson</a>
<a href="" ng-hide="ctrl.showjson==false" ng-click="ctrl.togglejson()" translate lib="web">showproperties</a>
<form ng-submit="ctrl.submit()" class="form-inline" role="form" autocomplete="off" ng-hide="ctrl.showjson==true">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" ng-disabled="ctrl.loading==true" class="btn btn-success" translate
lib="web">save</button>
</div>
</div>
<div class="form-group">
<label><span translate lib="web">name</span></label>
<input type="text" ng-class="{'form-control': true}" ng-model="ctrl.model.name" />
</div>
<div class="form-group" ng-show="menuctrl.hasrole('admins')">
<label><span translate lib="web">type</span></label>
<input type="text" ng-class="{'form-control': true}" ng-model="ctrl.model._type" />
</div>
<div ng-repeat="key in ctrl.keys" class="form-group" ng-show="!ctrl.isobject(ctrl.model[key]) && key != 'name'">
<label>{{ key }}</label>
<input type="{{ctrl.gettype(ctrl.model[key]) == 'boolean' ? 'checkbox' : 'text'}}" ng-model="ctrl.model[key]"
ng-type
ng-class="{'form-control': ctrl.gettype(ctrl.model[key]) != 'boolean', 'secret': ctrl.model._encrypt.indexOf(key) > -1}" />
</div>
<div ng-repeat="key in ctrl.keys" class="form-group" ng-show="ctrl.isobject(ctrl.model[key])">
<label>{{ key }}</label>
<textarea json-text class='form-control' rows='1' data-min-rows='1' ng-model="ctrl.model[key]"></textarea>
</div>
<div class="form-inline">
<label class="col-sm-2 control-label" translate lib="web">add key</label>
<div class="col-sm-4">
<input type="text" class='form-control' ng-model="ctrl.newkey"></input>
</div>
<div class="col-sm-2">
<button ng-click="ctrl.addkey()" type="button" ng-disabled="ctrl.loading==true" class="btn btn-success"
translate lib="web">add</button>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" ng-disabled="ctrl.loading==true" class="btn btn-success" translate
lib="web">save</button>
</div>
</div>
</form>
<form ng-submit="ctrl.submit()" class="form-horizontal" role="form" autocomplete="off" ng-hide="ctrl.showjson==false">
<div ng-hide="ctrl.showjson==false" class="form-group" style="width: 100%;">
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" ng-disabled="ctrl.loading==true" class="btn btn-success" translate
lib="web">save</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" translate lib="web">json</label>
<div class="col-sm-9">
<!-- <textarea class="form-control" rows="5" ng-model="ctrl.jsonmodel" style="max-width: 100%;"></textarea> -->
<textarea class=' form-control' rows='3' data-min-rows='3' ng-model="ctrl.jsonmodel"></textarea>
<!-- <textarea msd-elastic class="form-control" ></textarea> -->
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" ng-disabled="ctrl.loading==true" class="btn btn-success" translate
lib="web">save</button>
</div>
</div>
</div>
</form>