Documentation ¶
Index ¶
- type RBACManager
- func (m *RBACManager) Check(userID, projectID int64, operation string) (bool, error)
- func (m *RBACManager) CreateRole(role *models.RoleView) (err error)
- func (m *RBACManager) GetProjectRoleByProjectID(projectID int64) (*models.ProjectRole, error)
- func (m *RBACManager) GetRoleViewByRoleID(roleID int64) (*models.RoleView, error)
- func (m *RBACManager) GetUserRoleByUserID(userID int64) (*models.UserRole, error)
- type RBACOperationImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RBACManager ¶
RBACManager manage RBAC roles and permissions.
func (*RBACManager) Check ¶
func (m *RBACManager) Check(userID, projectID int64, operation string) (bool, error)
Check if user can do operation on project.
func (*RBACManager) CreateRole ¶
func (m *RBACManager) CreateRole(role *models.RoleView) (err error)
CreateRole and set ids.
func (*RBACManager) GetProjectRoleByProjectID ¶
func (m *RBACManager) GetProjectRoleByProjectID(projectID int64) (*models.ProjectRole, error)
func (*RBACManager) GetRoleViewByRoleID ¶
func (m *RBACManager) GetRoleViewByRoleID(roleID int64) (*models.RoleView, error)
func (*RBACManager) GetUserRoleByUserID ¶
func (m *RBACManager) GetUserRoleByUserID(userID int64) (*models.UserRole, error)
GetRolesByUserID returns roles for a user.
type RBACOperationImpl ¶
type RBACOperationImpl struct {
RBACManager RBACManager
}
RBACOperationImpl Handle rbac related requests.
func (*RBACOperationImpl) GetProjectRBAC ¶
func (r *RBACOperationImpl) GetProjectRBAC(params rbacop.GetProjectRBACParams, principal *models.AuthInfo) middleware.Responder
GetProjectRBAC Get Project RBAC.
func (*RBACOperationImpl) GetUserRBAC ¶
func (r *RBACOperationImpl) GetUserRBAC(params rbacop.GetUserRBACParams, principal *models.AuthInfo) middleware.Responder
GetUserRBAC Get User RBAC.
Click to show internal directories.
Click to hide internal directories.