Show / Hide Table of Contents

Class DualPermissions

A dual-permissions object handles two sets of permissions: users and managers. Permissions are set by managers, and users cannot change permissions.

Inheritance
System.Object
DualPermissions
Implements
System.ComponentModel.INotifyPropertyChanged
IHasClientControlledContainers
IController
IViewController
IHasUniversalID
IRPCAuthChecks
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
Namespace: Eco.Gameplay.Economy
Assembly: Eco.Gameplay.dll
Syntax
public class DualPermissions : Object, INotifyPropertyChanged, IHasClientControlledContainers, IController, IViewController, IHasUniversalID, IRPCAuthChecks, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions

Constructors

DualPermissions()

Declaration
public DualPermissions()

Fields

ManagerSetChangedEvent

Declaration
public ThreadSafeAction<IEnumerable<User>> ManagerSetChangedEvent
Field Value
Type Description
ThreadSafeAction<System.Collections.Generic.IEnumerable<User>>

OnTryAdd

Declaration
public Func<Player, IAlias, PermissionsType, bool> OnTryAdd
Field Value
Type Description
System.Func<Player, IAlias, PermissionsType, System.Boolean>

OnTryRemove

Declaration
public Func<Player, IAlias, PermissionsType, bool> OnTryRemove
Field Value
Type Description
System.Func<Player, IAlias, PermissionsType, System.Boolean>

OnTrySet

Declaration
public Func<Player, IEnumerable<IAlias>, bool> OnTrySet
Field Value
Type Description
System.Func<Player, System.Collections.Generic.IEnumerable<IAlias>, System.Boolean>

PermissionsChangedEvent

Declaration
public ThreadSafeAction PermissionsChangedEvent
Field Value
Type Description
ThreadSafeAction

UserSetChangedEvent

Declaration
public ThreadSafeAction<IEnumerable<User>> UserSetChangedEvent
Field Value
Type Description
ThreadSafeAction<System.Collections.Generic.IEnumerable<User>>

Properties

AllAliases

Declaration
public IEnumerable<IAlias> AllAliases { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IAlias>

AllManagers

Declaration
public IEnumerable<User> AllManagers { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<User>

AllNormalUsers

Declaration
public IEnumerable<User> AllNormalUsers { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<User>

AllUsers

Declaration
public IEnumerable<User> AllUsers { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<User>

ControllerID

Declaration
public ref int ControllerID { get; }
Property Value
Type Description
System.Int32

ManagerSet

Declaration
[ClientCanSelectAndAdd("Select Managers", "Manager", "Managers", true)]
public ControllerAliasSet ManagerSet { get; set; }
Property Value
Type Description
ControllerAliasSet

Subscriptions

Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Type Description
ThreadSafeSubscriptions

UserSet

Declaration
[ClientCanSelectAndAdd("Select Users", "User", "user", true)]
public ControllerAliasSet UserSet { get; set; }
Property Value
Type Description
ControllerAliasSet

Methods

AccessType(Player)

Declaration
public AccountAccess AccessType(Player player)
Parameters
Type Name Description
Player player
Returns
Type Description
AccountAccess

AccessType(User)

Declaration
public AccountAccess AccessType(User user)
Parameters
Type Name Description
User user
Returns
Type Description
AccountAccess

CanAccess(IAlias, AccountAccess, Boolean)

Declaration
public bool CanAccess(IAlias alias, AccountAccess access, bool sendNoticeOnFail = false)
Parameters
Type Name Description
IAlias alias
AccountAccess access
System.Boolean sendNoticeOnFail
Returns
Type Description
System.Boolean

Destroyed()

Declaration
public void Destroyed()

Initialize(LocString, LocString, Func<LocString>)

Declaration
public virtual void Initialize(LocString managementTitle, LocString userTitle, Func<LocString> markedUpName)
Parameters
Type Name Description
LocString managementTitle
LocString userTitle
System.Func<LocString> markedUpName

InList(User, AccountAccess)

Declaration
public bool InList(User user, AccountAccess access)
Parameters
Type Name Description
User user
AccountAccess access
Returns
Type Description
System.Boolean

VerifyCanAdd(Player, IClientControlledContainer, Object)

Declaration
public bool VerifyCanAdd(Player player, IClientControlledContainer container, object obj)
Parameters
Type Name Description
Player player
IClientControlledContainer container
System.Object obj
Returns
Type Description
System.Boolean

VerifyCanRemove(Player, IClientControlledContainer, Object)

Declaration
public Task<Result> VerifyCanRemove(Player player, IClientControlledContainer container, object obj)
Parameters
Type Name Description
Player player
IClientControlledContainer container
System.Object obj
Returns
Type Description
System.Threading.Tasks.Task<Result>

VerifyNewSetIsValid(Player, IClientControlledContainer, IEnumerable<Object>)

Verify if the player and the new set can be set to the container.

Declaration
public Task<Result> VerifyNewSetIsValid(Player player, IClientControlledContainer container, IEnumerable<object> newSet)
Parameters
Type Name Description
Player player
IClientControlledContainer container
System.Collections.Generic.IEnumerable<System.Object> newSet
Returns
Type Description
System.Threading.Tasks.Task<Result>

Events

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

Implements

System.ComponentModel.INotifyPropertyChanged
IHasClientControlledContainers
IController
IViewController
IHasUniversalID
IRPCAuthChecks
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
EconomyTooltipLibrary.DualPermissionsTooltip(DualPermissions)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾