permissionstestutils

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package permissionstestutils are exported functions to be run in 3rd party package or integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCurrentUserAsRoot

func DefaultCurrentUserAsRoot()

DefaultCurrentUserAsRoot mocks the current user as root for the permission manager.

func IdempotentPermissionError

func IdempotentPermissionError(msg string) string

IdempotentPermissionError strips the UID from the permission error message.

func SetCurrentUserAsRoot

func SetCurrentUserAsRoot(m *permissions.Manager, currentUserAsRoot bool)

SetCurrentUserAsRoot mutates a default permission to the current user's UID if currentUserAsRoot is true.

func WithCurrentUserAsRoot

func WithCurrentUserAsRoot() permissions.Option

WithCurrentUserAsRoot returns an Option that sets the rootUID to the current user's UID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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