public virtual Boolean IsAuthorizedFor(String accountId, String area, String controller, String action) { String privilege = (area + "/" + controller + "/" + action).ToLower(); if (!Required.ContainsKey(privilege)) { return(true); } if (!Privileges.ContainsKey(accountId ?? "")) { return(false); } return(Privileges[accountId].Contains(Required[privilege])); }
// Determines whether the command is in the minimal (MinTPM) profile internal static bool InProfile0(TpmCc code) { return(Privileges.ContainsKey(code)); }