Merge pull request 'Don't let a group's members share its mailboxes on' (#146) from fix/group-mailbox-no-onward-share into main
This commit was merged in pull request #146.
This commit is contained in:
commit
5f6548bfdd
5 files changed
+76
-4
No files matched your search
@@ -553,6 +553,16 @@ impl AccessToken {
|
||||
|| self.inner.access_to.iter().any(|a| a.account_id == account_id)
|
||||
}
|
||||
|
||||
/// inbuxa: MA-D0: in the account only because it is a group this token
|
||||
/// belongs to. Such a member has the group's mailbox but may not share it
|
||||
/// on: who is in a group is an administrator's decision, and a share
|
||||
/// would let anyone in.
|
||||
pub fn is_group_member_only(&self, account_id: u32) -> bool {
|
||||
self.inner.account_id != account_id
|
||||
&& self.inner.member_of.contains(&account_id)
|
||||
&& !self.has_permission(Permission::Impersonate)
|
||||
}
|
||||
|
||||
pub fn is_account_id(&self, account_id: u32) -> bool {
|
||||
self.inner.account_id == account_id
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user