Documentation ¶
Overview ¶
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AdminAdminGet = New("admin::get", "有权限获取横幅信息") AdminAdminCreate = New("admin::create", "有权限创建新横幅") AdminAdminUpdate = New("admin::update", "有权限修改横幅信息") AdminAdminDelete = New("admin::delete", "有权限删除横幅") AdminNewsGet = New("news::get", "有权限获取新闻") AdminNewsCreate = New("news::create", "有权限创建新闻") AdminNewsUpdate = New("news::update", "有权限修改新闻") AdminNewsDelete = New("news::delete", "有权限删除新闻") AdminUserGet = New("user::get", "有权限获取用户信息") AdminUserCreate = New("user::create", "有权限创建新用户") AdminUserUpdate = New("user::update", "有权限修改用户信息") AdminUserDelete = New("user::delete", "有权限删除用户") AdminUserExport = New("user::export", "有权限导出用户到CSV等") AdminMenuGet = New("menu::get", "有权限获取菜单信息") AdminMenuCreate = New("menu::create", "有权限创建新菜单") AdminMenuUpdate = New("menu::update", "有权限修改菜单信息") AdminMenuDelete = New("menu::delete", "有权限删除菜单") AdminBannerGet = New("banner::get", "有权限获取横幅信息") AdminBannerCreate = New("banner::create", "有权限创建新横幅") AdminBannerUpdate = New("banner::update", "有权限修改横幅信息") AdminBannerDelete = New("banner::delete", "有权限删除横幅") AdminReportGet = New("report::get", "有权限获取反馈信息") AdminReportUpdate = New("report::update", "有权限修改反馈信息") AdminReportDelete = New("report::delete", "有权限删除反馈信息") // 管理员的所有权限 AdminList = []*Accession{ AdminAdminGet, AdminAdminCreate, AdminAdminUpdate, AdminAdminDelete, AdminNewsGet, AdminNewsCreate, AdminNewsUpdate, AdminNewsDelete, adminNotificationGet, adminNotificationUpdate, adminNotificationDelete, adminNotificationCreate, AdminUserGet, AdminUserCreate, AdminUserUpdate, AdminUserDelete, AdminUserExport, AdminMenuGet, AdminMenuCreate, AdminMenuUpdate, AdminMenuDelete, AdminBannerGet, AdminBannerCreate, AdminBannerUpdate, AdminBannerDelete, AdminReportGet, AdminReportUpdate, AdminReportDelete, } AdminMap = map[string]*Accession{} )
View Source
var ( // 用户类 ProfileUpdate = New("profile::update", "有权限修改用户资料") PasswordUpdate = New("password::update", "有权限更改自己的密码") Password2Set = New("password2.set", "有权限设置二级密码") Password2Reset = New("password2.reset", "有权限重置二级密码") Password2Update = New("password2::update", "有权限修改二级密码") DoTransfer = New("transfer::create", "有权限发起转账交易") // 用户的所有的权限 List = []*Accession{ ProfileUpdate, PasswordUpdate, Password2Set, Password2Update, DoTransfer, } Map = map[string]*Accession{} )
Functions ¶
func FilterAdminAccession ¶
筛选出有效的管理员权限
Types ¶
Click to show internal directories.
Click to hide internal directories.