v0.11.3 - Fixed roles

Added pattern to passwords
This commit is contained in:
Anders
2020-09-07 08:33:46 +02:00
parent 84f5c51c48
commit 5f234d95dc
5 changed files with 33 additions and 16 deletions
@@ -70,9 +70,9 @@
<tr>
<td>Aktiviteter</td>
<td><p>Empty</p></td>
<td><input id="EventRAccount" type="checkbox" name="value[]" value="userevent.create" @if ($role->hasPermissionTo("userevent.create")) checked @endif></td>
<td><input id="EventParticipateAccount" type="checkbox" name="value[]" value="userevent.create" @if ($role->hasPermissionTo("userevent.create")) checked @endif></td>
<td><input id="EventRAccount" onclick="if ($('#EventR').prop('checked') == false) $('#EventR').prop('checked', true); else $('#EventR').prop('checked', false);" type="checkbox" name="value[]" value="event.show" @if ($role->hasPermissionTo("event.show")) checked @endif></td>
<td><input id="EventRAccount" type="checkbox" name="value[]" value="userevent.delete" @if ($role->hasPermissionTo("userevent.delete")) checked @endif></td>
<td><input id="EventStopParticipatingAccount" type="checkbox" name="value[]" value="userevent.delete" @if ($role->hasPermissionTo("userevent.delete")) checked @endif></td>
</tr>
<tr>
<td>Reservationer</td>
@@ -195,7 +195,7 @@
<td><input id="ReservationR" onclick="if ($('#ReservationRAccount').prop('checked') == false) $('#ReservationRAccount').prop('checked', true); else $('#ReservationRAccount').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show" @if ($role->hasPermissionTo("washing.machine.reservation.show")) checked @endif></td>
<td></td>
<td><input id="ReservationD" onclick="if ($('#ReservationDAccount').prop('checked') == false) $('#ReservationDAccount').prop('checked', true); else $('#ReservationDAccount').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.delete" @if ($role->hasPermissionTo("washing.machine.reservation.delete")) checked @endif></td>
<td><input id="Reservation" type="checkbox" onclick="FullControl(this)"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
<td></td>
</tr>
<tr>
<td>Kontakter</td>
@@ -222,7 +222,7 @@
<td><input id="FeedbackR" onclick="if ($('#FeedbackRAccount').prop('checked') == false) $('#FeedbackRAccount').prop('checked', true); else $('#FeedbackRAccount').prop('checked', false);" type="checkbox" name="value[]" value="feedback.show" @if ($role->hasPermissionTo("feedback.show")) checked @endif></td>
<td></td>
<td><input id="FeedbackD" type="checkbox" name="value[]" value="feedback.delete" @if ($role->hasPermissionTo("feedback.delete")) checked @endif></td>
<td><input id="Feedback" type="checkbox" onclick="FullControl(this)"></td><!--Lave en rolle som give fuld adgang ligesom ownuser.edit-->
<td></td>
</tr>
</table>
</div>
@@ -334,11 +334,21 @@
$('#' + Read).prop('checked', false);
$('#' + Update).prop('checked', false);
$('#' + Delete).prop('checked', false);
// If there is a button in the app side too - Then check off
$('#' + Create + 'Account').prop('checked', false);
$('#' + Read + 'Account').prop('checked', false);
$('#' + Delete + 'Account').prop('checked', false);
} else {
$('#' + Create).prop('checked', true);
$('#' + Read).prop('checked', true);
$('#' + Update).prop('checked', true);
$('#' + Delete).prop('checked', true);
// If there is a button in the app side too - Then check on
$('#' + Create + 'Account').prop('checked', true);
$('#' + Read + 'Account').prop('checked', true);
$('#' + Delete + 'Account').prop('checked', true);
}
}
@@ -348,9 +358,6 @@
for (i = 0; i < arr.length; i++) {
if ($('#'+arr[i]+'C').prop('checked') == true && $('#'+arr[i]+'R').prop('checked') == true && $('#'+arr[i]+'U').prop('checked') == true && $('#'+arr[i]+'D').prop('checked') == true)
$('#'+arr[i]).prop('checked', true);
else if(arr[i] == 'Feedback' || arr[i] == 'Reservation')
if($('#'+arr[i]+'R').prop('checked') == true && $('#'+arr[i]+'D').prop('checked') == true)
$('#'+arr[i]).prop('checked', true);
}
});
</script>