Implement setting group permissions

This commit is contained in:
AsamK 2021-05-15 16:37:52 +02:00
parent 7170a68571
commit 78f22c7020
7 changed files with 104 additions and 13 deletions

View file

@ -0,0 +1,27 @@
package org.asamk.signal;
public enum GroupPermission {
EVERY_MEMBER {
@Override
public String toString() {
return "every-member";
}
},
ONLY_ADMINS {
@Override
public String toString() {
return "only-admins";
}
};
public org.asamk.signal.manager.groups.GroupPermission toManager() {
switch (this) {
case EVERY_MEMBER:
return org.asamk.signal.manager.groups.GroupPermission.EVERY_MEMBER;
case ONLY_ADMINS:
return org.asamk.signal.manager.groups.GroupPermission.ONLY_ADMINS;
default:
throw new AssertionError();
}
}
}