Commit 4de91445 authored by Yorrd's avatar Yorrd
Browse files

feat: admin accounts können alles bearbeiten

parent ed1f4c83
......@@ -91,7 +91,7 @@ export class CCBContentsAdmin extends AdornisDBView<Content> {
map(user =>
this.css({
position: 'relative',
...(!user || user._id !== entity.createdBy ? { pointerEvents: 'none', opacity: '0.5' } : {}),
...(!user || !user.isAdmin ? { pointerEvents: 'none', opacity: '0.5' } : {}),
}),
),
)}"
......
......@@ -91,10 +91,14 @@ export class CCBUsersAdmin extends AdornisDBView<CCBUser> {
${data[field.name]}
</a-box>
`;
case 'isAdmin':
case 'verified':
return html`
<a-box padding="md">
<mwc-switch ?checked=${data.verified} @click=${() => (data.verified = !data.verified)}></mwc-switch>
<mwc-switch
?checked=${data[field.name]}
@click=${() => (data[field.name] = !data[field.name])}
></mwc-switch>
</a-box>
`;
case 'logo':
......
......@@ -18,4 +18,7 @@ export class CCBUser extends AdornisUser {
public verified?: boolean;
@Field(String)
public logo?: string;
@Field(Boolean)
public isAdmin!: boolean;
}
Subproject commit 66e8a13d8f25795eb1fd0f23f8e1fc6447d3a7d1
Subproject commit 660d7196c3402323df862d79b2cdc267a7870400
Subproject commit c739c2c9235276b61ec04046f161c7b88373ea8d
Subproject commit e402c7f2257b2debaf19db0a62a4a12b9fb67f3c
Subproject commit 880b11d5faf023bd2c89a8f87f33d0ba676a6fb9
Subproject commit 5483275c2fbc7eea73784b271a3fca2dcca777d7
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment