(cont) identity > canUserRun() - Logic Design (comments)
This commit is contained in:
parent
39033f4178
commit
5f7ea5d2a7
1 changed files with 13 additions and 2 deletions
|
@ -53,8 +53,8 @@ pub fn init(mgr:&mut ModulesManager)
|
||||||
|
|
||||||
pub enum UserRole {
|
pub enum UserRole {
|
||||||
Chatter,
|
Chatter,
|
||||||
Mod(String), // String specifies Channel
|
Mod(ChType), // String specifies Channel
|
||||||
SupMod(String), // String specifies Channel
|
SupMod(ChType), // String specifies Channel
|
||||||
Broadcaster,
|
Broadcaster,
|
||||||
BotAdmin,
|
BotAdmin,
|
||||||
|
|
||||||
|
@ -116,6 +116,17 @@ impl IdentityManager {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Requirements
|
||||||
|
/*
|
||||||
|
[ ] If cmdreqroles is empty vector , automatically assume Ok(Permissible::Allow)
|
||||||
|
[ ] If chatBadge::Broadcaster ...
|
||||||
|
[ ] and cmdreqroles includes UserRole::Broadcaster , Ok(Permissible::Allow)
|
||||||
|
[ ] and cmdreqroles includes UserRole::Mod("") OR UserRole::SupMod("") , Ok(Permissible::Allow)
|
||||||
|
[ ] If cmdreqroles includes UserRole::Mod("") , checks if chatter has UserRole::Mod(channelname::ChType) to determine if Ok(Permissible::Allow)
|
||||||
|
[ ] If cmdreqroles includes UserRole::SupMod("") , checks if chatter has UserRole::SupMod(channelname::ChType) to determine if Ok(Permissible::Allow)
|
||||||
|
[ ] If cmdreqroles includes UserRole::BotAdmin and chatter has UserRole::BotAdmin , Ok(Permissible::Allow)
|
||||||
|
[ ] Otherwise, Ok(Permissible::Block)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
Ok(Permissible::Allow)
|
Ok(Permissible::Allow)
|
||||||
|
|
Loading…
Reference in a new issue