fix: Domain admin can see domain in home
This commit is contained in:
parent
8a7e644960
commit
38700ee4cb
3 changed files with 15 additions and 9 deletions
|
|
@ -84,6 +84,12 @@ impl User {
|
|||
pub fn can_create_domain(&self) -> bool {
|
||||
self.role.can_perform(&Operation::CreateDomain)
|
||||
}
|
||||
|
||||
pub fn can_see_domain(&self, domain: &str) -> bool {
|
||||
let allowed = self.role.can_see_domain(domain);
|
||||
tracing::debug!("{} can see domain {}: {}", self.mail, domain, allowed);
|
||||
allowed
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for User {
|
||||
|
|
|
|||
Loading…
Reference in a new issue