Documentation ¶
Overview ¶
Package audit provides channel and role audit functionality. The audit rules are:
- Admin role can only be held by specific roles
- @everyone role must match specific permissions
- Any roles providing extra permissions must be explicitly defined
- Channels should only provide visibility for a single base role
- Exceptions to be explicit
- Read Only channels can provide custom permissions for the role allowed to
- write.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RolePermissions = map[string]int64{
"@everyone": basePermissions,
"Amenity Leader": 1071698538049,
"Mods": 1440260156551,
"Discord Security": 2196338376671,
"Announcements": 2198083203015,
"Admin": 2189895925759,
"Owner": 1069551046217,
}
RolePermissions we expect.
Functions ¶
This section is empty.
Types ¶
type Inspection ¶ added in v0.1.6
Inspection on a server.
func (*Inspection) Admin ¶ added in v0.1.6
func (i *Inspection) Admin(role *discordgo.Role)
Admin permissions (admin and manager) should only be assigned to the Admin role. Roles that incorrectly have administrator permissions will be added to the inspection report.
func (*Inspection) Base ¶ added in v0.1.6
func (i *Inspection) Base(role *discordgo.Role)
Base permissions check. Roles should have 0 permissions, base permissions, or be listed in the Inspection.Roles set with the expected permissions.
func (*Inspection) Check ¶ added in v0.1.6
func (i *Inspection) Check(session *discordgo.Session, id string) error
Check the given server for permission violations.
func (*Inspection) Overwrites ¶ added in v0.1.6
func (i *Inspection) Overwrites(channel *discordgo.Channel)
Overwrites check the channel overwrites are as we expect.
func (*Inspection) Report ¶ added in v0.1.6
func (i *Inspection) Report() []string
Report on the Inspection.
Click to show internal directories.
Click to hide internal directories.