Skip to content

Commit

Permalink
hide global keystore content and add perms closes amidaware/tacticalr…
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 6, 2024
1 parent 797b27a commit 9457bf2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/components/accounts/RolesForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@
v-model="localRole.can_edit_core_settings"
label="Edit Global Settings"
/>
<q-checkbox
v-model="localRole.can_view_global_keystore"
label="View Global Key Store"
/>
<q-checkbox
v-model="localRole.can_edit_global_keystore"
label="Edit Global Key Store"
/>
<q-checkbox
v-model="localRole.can_do_server_maint"
label="Do Server Maintenance"
Expand Down Expand Up @@ -477,6 +485,8 @@ export default {
// settings perms
can_view_core_settings: false,
can_edit_core_settings: false,
can_view_global_keystore: false,
can_edit_global_keystore: false,
can_do_server_maint: false,
can_code_sign: false,
can_run_urlactions: false,
Expand Down
11 changes: 10 additions & 1 deletion src/components/modals/coresettings/KeyStoreForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@
outlined
dense
v-model="localKey.value"
:type="isPwd ? 'password' : 'text'"
:rules="[(val) => !!val || '*Required']"
/>
><template v-slot:append>
<q-icon
:name="isPwd ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="isPwd = !isPwd"
/>
</template>
</q-input>
</q-card-section>

<q-card-actions align="right">
Expand All @@ -50,6 +58,7 @@ export default {
props: { globalKey: Object },
data() {
return {
isPwd: true,
localKey: {
name: "",
value: "",
Expand Down
12 changes: 11 additions & 1 deletion src/components/modals/coresettings/KeyStoreTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
<div class="row">
<div class="text-subtitle2">Global Key Store</div>
<q-space />
<q-btn
size="sm"
color="grey-5"
text-color="black"
class="q-mr-sm"
:label="isPwd ? 'Show values' : 'Hide values'"
:icon="isPwd ? 'visibility_off' : 'visibility'"
@click="isPwd = !isPwd"
/>
<q-btn
size="sm"
color="grey-5"
Expand Down Expand Up @@ -61,7 +70,7 @@
</q-td>
<!-- value -->
<q-td>
{{ props.row.value }}
{{ isPwd ? "****" : props.row.value }}
</q-td>
</q-tr>
</template>
Expand All @@ -79,6 +88,7 @@ export default {
data() {
return {
keystore: [],
isPwd: true,
pagination: {
rowsPerPage: 0,
sortBy: "name",
Expand Down

0 comments on commit 9457bf2

Please sign in to comment.