diff options
author | Robert Adam <dev@robert-adam.de> | 2019-12-28 18:15:40 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2020-02-28 20:41:00 +0300 |
commit | 7f7cc6c5538c0854305a15a3789bbe466f93c9a6 (patch) | |
tree | 46182116fad26f5a85e2d906252ab1712190a426 /src/mumble/ACLEditor.cpp | |
parent | 8bb5cafcac39f5714e474fac1106ed2610137891 (diff) |
ACL: Added isPassword() function and made use of it in ACLEditor
Diffstat (limited to 'src/mumble/ACLEditor.cpp')
-rw-r--r-- | src/mumble/ACLEditor.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mumble/ACLEditor.cpp b/src/mumble/ACLEditor.cpp index 17984bb86..d17504bbc 100644 --- a/src/mumble/ACLEditor.cpp +++ b/src/mumble/ACLEditor.cpp @@ -649,17 +649,10 @@ void ACLEditor::on_qtwTab_currentChanged(int index) { } void ACLEditor::updatePasswordField() { + // Search for an ACL that represents the current password pcaPassword = NULL; foreach(ChanACL *acl, qlACLs) { - // Check for sth that applies to '#<something>' AND grants 'Enter' AND may grant 'Speak', 'Whisper', - // 'TextMessage', 'Link' but NOTHING else AND does not deny anything, then '<something>' is the password. - if (acl->qsGroup.startsWith(QLatin1Char('#')) && - acl->bApplyHere && - !acl->bInherited && - (acl->pAllow & ChanACL::Enter) && - (acl->pAllow == (ChanACL::Enter | ChanACL::Speak | ChanACL::Whisper | ChanACL::TextMessage | ChanACL::LinkChannel) || // Backwards compat with old behaviour that didn't deny traverse - acl->pAllow == (ChanACL::Enter | ChanACL::Speak | ChanACL::Whisper | ChanACL::TextMessage | ChanACL::LinkChannel | ChanACL::Traverse)) && - acl->pDeny == ChanACL::None) { + if (acl->isPassword()) { pcaPassword = acl; } } |