getPrivilegeLevel static method
Future<PrivilegeLevel?>
getPrivilegeLevel(
- AppModel app,
- MemberModel member,
- bool isOwner
)
Implementation
static Future<PrivilegeLevel?> getPrivilegeLevel(
AppModel app, MemberModel member, bool isOwner) async {
if (isOwner) return PrivilegeLevel.ownerPrivilege;
var access =
await accessRepository(appId: app.documentID)!.get(member.documentID);
var privilegeLevel = access == null ? 0 : access.privilegeLevel;
return privilegeLevel as Future<PrivilegeLevel?>;
//return PrivilegeLevel.noPrivilege;
}