Help us shape the future of Go! Take the 2026 Go Developer Survey

accesscontrol

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Copyright (C) 2023 Tim Bastin, l3montree GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var AccessControlModule = fx.Options(
	fx.Provide(newCasbinPubSubWatcher),
	fx.Provide(fx.Annotate(NewCasbinRBACProvider, fx.As(new(shared.RBACProvider)))),
	fx.Provide(NewExternalEntityProviderRBAC),
	fx.Provide(func() shared.PublicClient {
		return shared.NewPublicClient(GetOryAPIClient(os.Getenv("ORY_KRATOS_PUBLIC")))
	}),
	fx.Provide(func() shared.AdminClient {
		return shared.NewAdminClient(GetOryAPIClient(os.Getenv("ORY_KRATOS_ADMIN")))
	}),
)
View Source
var NoSession session = session{
	// contains filtered or unexported fields
}

Functions

func FetchMembersOfOrganization

func FetchMembersOfOrganization(ctx shared.Context) ([]dtos.UserDTO, error)

FetchMembersOfOrganization retrieves all members of an organization including their roles from both the RBAC system and third-party integrations

func GetOryAPIClient

func GetOryAPIClient(url string) *client.APIClient

func NewCasbinRBACProvider

func NewCasbinRBACProvider(db *gorm.DB, broker shared.PubSubBroker) (casbinRBACProvider, error)

the provider can be used to create domain specific RBAC instances

func NewExternalEntityProviderRBAC

func NewExternalEntityProviderRBAC(ctx shared.Context, rootAccessControl shared.AccessControl, thirdPartyIntegration shared.IntegrationAggregate, externalEntityProviderID string, adminToken *string) *externalEntityProviderRBAC

func NewSession

func NewSession(userID string, scopes []string) session

Types

This section is empty.

Jump to

Keyboard shortcuts

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