rbac

package
v0.0.0-...-f2dd2ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cookie7 = beego.AppConfig.String("cookie7")

Functions

func CheckCookie

func CheckCookie(ctx *context.Context) (bool, admin.User)

func CheckLogin

func CheckLogin(username string, password string) (user admin.User, err error)

Types

type Attributes

type Attributes struct {
	Url   string `json:"url"`
	Price int64  `json:"price"`
}

type CommonController

type CommonController struct {
	Templatetype string //ui template type
	// contains filtered or unexported fields
}

func (*CommonController) GetTemplate

func (this *CommonController) GetTemplate() string

获取模板位置

func (*CommonController) GetTree

func (this *CommonController) GetTree() []Tree

获取权限各节点URL 权限控制器 用户节点 /rbac /node/index

func (*CommonController) Prepare

func (this *CommonController) Prepare()

func (*CommonController) Rsp

func (this *CommonController) Rsp(status bool, str string)

请求状态响应

type GroupController

type GroupController struct {
	CommonController
}

func (*GroupController) AddGroup

func (this *GroupController) AddGroup()

func (*GroupController) DelGroup

func (this *GroupController) DelGroup()

func (*GroupController) Index

func (this *GroupController) Index()

func (*GroupController) UpdateGroup

func (this *GroupController) UpdateGroup()

type MainController

type MainController struct {
	CommonController
}

func (*MainController) Changepwd

func (this *MainController) Changepwd()

修改密码

func (*MainController) Index

func (this *MainController) Index()

后台首页,路由路径不是三个参数且public不经过过滤器,这里要验证一下。

func (*MainController) Login

func (this *MainController) Login()

登录

func (*MainController) Logout

func (this *MainController) Logout()

退出登陆,不需要验证

type NodeController

type NodeController struct {
	CommonController
}

func (*NodeController) AddAndEdit

func (this *NodeController) AddAndEdit()

func (*NodeController) DelNode

func (this *NodeController) DelNode()

func (*NodeController) Index

func (this *NodeController) Index()

func (*NodeController) Rsp

func (this *NodeController) Rsp(status bool, str string)

type RoleController

type RoleController struct {
	CommonController
}

func (*RoleController) AccessToNode

func (this *RoleController) AccessToNode()

func (*RoleController) AddAccess

func (this *RoleController) AddAccess()

func (*RoleController) AddAndEdit

func (this *RoleController) AddAndEdit()

func (*RoleController) AddRoleToUser

func (this *RoleController) AddRoleToUser()

func (*RoleController) DelRole

func (this *RoleController) DelRole()

func (*RoleController) Getlist

func (this *RoleController) Getlist()

func (*RoleController) Index

func (this *RoleController) Index()

func (*RoleController) RoleToUserList

func (this *RoleController) RoleToUserList()

type Tree

type Tree struct {
	Id         int64      `json:"id"`
	GroupId    int64      `json:"-"`
	Text       string     `json:"text"`
	IconCls    string     `json:"iconCls"`
	Checked    string     `json:"checked"`
	State      string     `json:"state"`
	Children   []Tree     `json:"children"`
	Attributes Attributes `json:"attributes"`
}

type UserController

type UserController struct {
	CommonController
}

func (*UserController) AddUser

func (this *UserController) AddUser()

func (*UserController) DelUser

func (this *UserController) DelUser()

func (*UserController) Index

func (this *UserController) Index()

func (*UserController) UpdateUser

func (this *UserController) UpdateUser()

func (*UserController) UpdateUserPasswd

func (this *UserController) UpdateUserPasswd()

UpdateUserPasswd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL