permissions

package
v0.83.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 13 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package permissions is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	ValidateUserPermissions(ctx context.Context, accountID, userID string, module modules.Module, operation operations.Operation) (bool, context.Context, error)
	ValidateRoleModuleAccess(ctx context.Context, accountID string, role roles.RolePermissions, module modules.Module, operation operations.Operation) bool
	ValidateAccountAccess(ctx context.Context, accountID string, user *types.User, allowOwnerAndAdmin bool) (context.Context, error)

	GetPermissionsByRole(ctx context.Context, role types.UserRole) (roles.Permissions, error)
	SetAccountManager(accountManager account.Manager)
}

func NewManager

func NewManager(store store.Store) Manager

type MockManager added in v0.40.1

type MockManager struct {
	// contains filtered or unexported fields
}

MockManager is a mock of Manager interface.

func NewMockManager added in v0.40.1

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance.

func (*MockManager) EXPECT added in v0.40.1

func (m *MockManager) EXPECT() *MockManagerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockManager) GetPermissionsByRole added in v0.43.2

func (m *MockManager) GetPermissionsByRole(ctx context.Context, role types.UserRole) (roles.Permissions, error)

GetPermissionsByRole mocks base method.

func (*MockManager) SetAccountManager added in v0.59.9

func (m *MockManager) SetAccountManager(accountManager account.Manager)

SetAccountManager mocks base method.

func (*MockManager) ValidateAccountAccess added in v0.40.1

func (m *MockManager) ValidateAccountAccess(ctx context.Context, accountID string, user *types.User, allowOwnerAndAdmin bool) (context.Context, error)

ValidateAccountAccess mocks base method.

func (*MockManager) ValidateRoleModuleAccess added in v0.40.1

func (m *MockManager) ValidateRoleModuleAccess(ctx context.Context, accountID string, role roles.RolePermissions, module modules.Module, operation operations.Operation) bool

ValidateRoleModuleAccess mocks base method.

func (*MockManager) ValidateUserPermissions added in v0.40.1

func (m *MockManager) ValidateUserPermissions(ctx context.Context, accountID, userID string, module modules.Module, operation operations.Operation) (bool, context.Context, error)

ValidateUserPermissions mocks base method.

type MockManagerMockRecorder added in v0.40.1

type MockManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) GetPermissionsByRole added in v0.43.2

func (mr *MockManagerMockRecorder) GetPermissionsByRole(ctx, role any) *gomock.Call

GetPermissionsByRole indicates an expected call of GetPermissionsByRole.

func (*MockManagerMockRecorder) SetAccountManager added in v0.59.9

func (mr *MockManagerMockRecorder) SetAccountManager(accountManager any) *gomock.Call

SetAccountManager indicates an expected call of SetAccountManager.

func (*MockManagerMockRecorder) ValidateAccountAccess added in v0.40.1

func (mr *MockManagerMockRecorder) ValidateAccountAccess(ctx, accountID, user, allowOwnerAndAdmin any) *gomock.Call

ValidateAccountAccess indicates an expected call of ValidateAccountAccess.

func (*MockManagerMockRecorder) ValidateRoleModuleAccess added in v0.40.1

func (mr *MockManagerMockRecorder) ValidateRoleModuleAccess(ctx, accountID, role, module, operation any) *gomock.Call

ValidateRoleModuleAccess indicates an expected call of ValidateRoleModuleAccess.

func (*MockManagerMockRecorder) ValidateUserPermissions added in v0.40.1

func (mr *MockManagerMockRecorder) ValidateUserPermissions(ctx, accountID, userID, module, operation any) *gomock.Call

ValidateUserPermissions indicates an expected call of ValidateUserPermissions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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