Remove export permission (if you can view you can export)
This commit is contained in:
parent
750abfcc6c
commit
2eb770fa15
4 changed files with 0 additions and 40 deletions
|
|
@ -85,7 +85,6 @@ func RoleAdd(c *fiber.Ctx) error {
|
||||||
role.RestoreMember = (c.FormValue("restore_member") == "on")
|
role.RestoreMember = (c.FormValue("restore_member") == "on")
|
||||||
role.PurgeMember = (c.FormValue("purge_member") == "on")
|
role.PurgeMember = (c.FormValue("purge_member") == "on")
|
||||||
role.ConvertMemberToContact = (c.FormValue("convert_member_to_contact") == "on")
|
role.ConvertMemberToContact = (c.FormValue("convert_member_to_contact") == "on")
|
||||||
role.ExportMember = (c.FormValue("export_member") == "on")
|
|
||||||
|
|
||||||
// Contact permissions
|
// Contact permissions
|
||||||
role.ShowContact = (c.FormValue("show_contact") == "on")
|
role.ShowContact = (c.FormValue("show_contact") == "on")
|
||||||
|
|
@ -96,7 +95,6 @@ func RoleAdd(c *fiber.Ctx) error {
|
||||||
role.RestoreContact = (c.FormValue("restore_contact") == "on")
|
role.RestoreContact = (c.FormValue("restore_contact") == "on")
|
||||||
role.PurgeContact = (c.FormValue("purge_contact") == "on")
|
role.PurgeContact = (c.FormValue("purge_contact") == "on")
|
||||||
role.ConvertContactToMember = (c.FormValue("convert_contact_to_member") == "on")
|
role.ConvertContactToMember = (c.FormValue("convert_contact_to_member") == "on")
|
||||||
role.ExportContact = (c.FormValue("export_contact") == "on")
|
|
||||||
|
|
||||||
if len(errors) == 0 {
|
if len(errors) == 0 {
|
||||||
result := db.Create(&role)
|
result := db.Create(&role)
|
||||||
|
|
@ -160,7 +158,6 @@ func RoleEdit(c *fiber.Ctx) error {
|
||||||
role.RestoreMember = (c.FormValue("restore_member") == "on")
|
role.RestoreMember = (c.FormValue("restore_member") == "on")
|
||||||
role.PurgeMember = (c.FormValue("purge_member") == "on")
|
role.PurgeMember = (c.FormValue("purge_member") == "on")
|
||||||
role.ConvertMemberToContact = (c.FormValue("convert_member_to_contact") == "on")
|
role.ConvertMemberToContact = (c.FormValue("convert_member_to_contact") == "on")
|
||||||
role.ExportMember = (c.FormValue("export_member") == "on")
|
|
||||||
|
|
||||||
// Contact permissions
|
// Contact permissions
|
||||||
role.ShowContact = (c.FormValue("show_contact") == "on")
|
role.ShowContact = (c.FormValue("show_contact") == "on")
|
||||||
|
|
@ -171,7 +168,6 @@ func RoleEdit(c *fiber.Ctx) error {
|
||||||
role.RestoreContact = (c.FormValue("restore_contact") == "on")
|
role.RestoreContact = (c.FormValue("restore_contact") == "on")
|
||||||
role.PurgeContact = (c.FormValue("purge_contact") == "on")
|
role.PurgeContact = (c.FormValue("purge_contact") == "on")
|
||||||
role.ConvertContactToMember = (c.FormValue("convert_contact_to_member") == "on")
|
role.ConvertContactToMember = (c.FormValue("convert_contact_to_member") == "on")
|
||||||
role.ExportContact = (c.FormValue("export_contact") == "on")
|
|
||||||
|
|
||||||
if len(errors) == 0 {
|
if len(errors) == 0 {
|
||||||
result := db.Save(&role)
|
result := db.Save(&role)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ type Role struct {
|
||||||
RestoreMember bool
|
RestoreMember bool
|
||||||
PurgeMember bool
|
PurgeMember bool
|
||||||
ConvertMemberToContact bool
|
ConvertMemberToContact bool
|
||||||
ExportMember bool
|
|
||||||
ShowContact bool
|
ShowContact bool
|
||||||
CreateContact bool
|
CreateContact bool
|
||||||
EditContact bool
|
EditContact bool
|
||||||
|
|
@ -22,5 +21,4 @@ type Role struct {
|
||||||
RestoreContact bool
|
RestoreContact bool
|
||||||
PurgeContact bool
|
PurgeContact bool
|
||||||
ConvertContactToMember bool
|
ConvertContactToMember bool
|
||||||
ExportContact bool
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,6 @@
|
||||||
<td>Convertir membres en contacts</td>
|
<td>Convertir membres en contacts</td>
|
||||||
<td>{% if Role.ConvertMemberToContact %}Oui{% else %}Non{% endif %}</td>
|
<td>{% if Role.ConvertMemberToContact %}Oui{% else %}Non{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Exporter membres (CSV)</td>
|
|
||||||
<td>{% if Role.ExportMember %}Oui{% else %}Non{% endif %}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -106,10 +102,6 @@
|
||||||
<td>Convertir contacts en membres</td>
|
<td>Convertir contacts en membres</td>
|
||||||
<td>{% if Role.ConvertContactToMember %}Oui{% else %}Non{% endif %}</td>
|
<td>{% if Role.ConvertContactToMember %}Oui{% else %}Non{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Exporter contacts (CSV)</td>
|
|
||||||
<td>{% if Role.ExportContact %}Oui{% else %}Non{% endif %}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -154,19 +154,6 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
class="form-check-input me-2"
|
|
||||||
id="export_member"
|
|
||||||
name="export_member"
|
|
||||||
{% if Role.ExportMember %}checked{% endif %}
|
|
||||||
>
|
|
||||||
<label for="export_member" class="form-label">
|
|
||||||
Exporter membres (CSV)
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3 mt-4">
|
<div class="mb-3 mt-4">
|
||||||
<b>Permissions - Contacts</b>
|
<b>Permissions - Contacts</b>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -275,19 +262,6 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
class="form-check-input me-2"
|
|
||||||
id="export_contact"
|
|
||||||
name="export_contact"
|
|
||||||
{% if Role.ExportContact %}checked{% endif %}
|
|
||||||
>
|
|
||||||
<label for="export_contact" class="form-label">
|
|
||||||
Exporter contacts (CSV)
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<button class="btn btn-primary" type="submit">
|
<button class="btn btn-primary" type="submit">
|
||||||
<i class="me-1 bi-floppy"></i>
|
<i class="me-1 bi-floppy"></i>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue