permissions

This commit is contained in:
2023-10-17 22:57:25 +03:00
parent 4b9e9cb4f6
commit 632684f514
29 changed files with 370 additions and 223 deletions
+4 -5
View File
@@ -9,7 +9,6 @@
const channel = getContext("channel");
export let users;
export let roles;
let name;
let email;
let role;
@@ -28,7 +27,7 @@
.post(channel.lucentUrl + "/members/invite", {
name: newName,
email: newEmail,
role: newRole,
roles: [newRole],
})
.then((response) => {
successAlert.show("User was invited");
@@ -49,7 +48,7 @@
axios
.post(channel.lucentUrl + "/members/update", {
id: e.detail.user,
role: e.detail.role,
roles: e.detail.roles,
})
.then((response) => {
successAlert.show("Users updated");
@@ -96,7 +95,7 @@
</div>
<div class="me-3">
{#each roles.filter((r) => r !== "removed") as arole}
{#each channel.roles.filter((r) => r !== "removed") as arole}
<Radio
bind:group={role}
value={arole}
@@ -117,7 +116,7 @@
{#each users as user}
<MemberSettingsCard
member={user}
roles={roles}
roles={channel.roles}
on:update={update}
on:reinvite={(e) => invite(e.detail.email, e.detail.role)}
/>