UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPathPermissionList Class Reference

#include <NamePermissionList.h>

+ Inheritance diagram for FPathPermissionList:

Public Member Functions

CORE_API FPathPermissionList (EPathPermissionListType InType=EPathPermissionListType::Default)
 
virtual PRAGMA_DISABLE_DEPRECATION_WARNINGS ~FPathPermissionList ()
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS FPathPermissionList (const FPathPermissionList &)=default
 
FPathPermissionListoperator= (const FPathPermissionList &)=default
 
 FPathPermissionList (FPathPermissionList &&)=default
 
FPathPermissionListoperator= (FPathPermissionList &&)=default
 
CORE_API bool PassesFilter (const FStringView Item) const
 
CORE_API bool PassesFilter (const FName Item) const
 
CORE_API bool PassesFilter (const TCHAR *Item) const
 
CORE_API bool PassesStartsWithFilter (const FStringView Item, const bool bAllowParentPaths=false) const
 
CORE_API bool PassesStartsWithFilter (const FName Item, const bool bAllowParentPaths=false) const
 
CORE_API bool PassesStartsWithFilter (const TCHAR *Item, const bool bAllowParentPaths=false) const
 
CORE_API EPathPermissionPrefixResult PassesStartsWithFilterRecursive (const FStringView Item, const bool bAllowParentPaths=false) const
 
CORE_API bool AddDenyListItem (const FName OwnerName, const FStringView Item)
 
CORE_API bool AddDenyListItem (const FName OwnerName, const FName Item)
 
CORE_API bool AddDenyListItem (const FName OwnerName, const TCHAR *Item)
 
CORE_API bool ContainsDenyListItem (FStringView Item) const
 
CORE_API bool HasDenyListEntries () const
 
CORE_API TArray< FString > GetDenyListEntries () const
 
CORE_API bool RemoveDenyListItem (const FName OwnerName, const FStringView Item)
 
CORE_API bool RemoveDenyListItem (const FName OwnerName, const FName Item)
 
CORE_API bool RemoveDenyListItem (const FName OwnerName, const TCHAR *Item)
 
CORE_API FPermissionListOwners RemoveDenyListItemAndGetOwners (FStringView Item)
 
CORE_API bool AddAllowListItem (const FName OwnerName, const FStringView Item)
 
CORE_API bool AddAllowListItem (const FName OwnerName, const FName Item)
 
CORE_API bool AddAllowListItem (const FName OwnerName, const TCHAR *Item)
 
CORE_API bool HasAllowListEntries () const
 
CORE_API TArray< FString > GetAllowListEntries () const
 
CORE_API bool RemoveAllowListItem (const FName OwnerName, const FStringView Item)
 
CORE_API bool RemoveAllowListItem (const FName OwnerName, const FName Item)
 
CORE_API bool RemoveAllowListItem (const FName OwnerName, const TCHAR *Item)
 
CORE_API bool AddDenyListAll (const FName OwnerName)
 
CORE_API bool HasFiltering () const
 
CORE_API TArray< FNameGetOwnerNames () const
 
CORE_API bool UnregisterOwner (const FName OwnerName)
 
CORE_API bool UnregisterOwners (const TArray< FName > &OwnerNames)
 
CORE_API bool Append (const FPathPermissionList &Other)
 
CORE_API FPathPermissionList CombinePathFilters (const FPathPermissionList &OtherFilter) const
 
CORE_API bool UnregisterOwnersAndAppend (const TArray< FName > &OwnerNamesToRemove, const FPathPermissionList &FiltersToAdd)
 
const TMap< FString, FPermissionListOwners > & GetDenyList () const
 
const TMap< FString, FPermissionListOwners > & GetAllowList () const
 
bool IsDenyListAll () const
 
FSimpleMulticastDelegateOnFilterChanged ()
 
CORE_API FString ToString () const
 
- Public Member Functions inherited from TSharedFromThis< FPathPermissionList >
TSharedRef< FPathPermissionList, Mode > AsShared ()
 
TSharedRef< FPathPermissionList const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FPathPermissionList, Mode > AsWeak ()
 
TWeakPtr< FPathPermissionList const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Protected Member Functions

CORE_API void VerifyItemMatchesListType (const FStringView Item) const
 
- Protected Member Functions inherited from TSharedFromThis< FPathPermissionList >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Protected Attributes

TDirectoryTree< FPermissionListOwnersDenyTree
 
TDirectoryTree< FPermissionListOwnersAllowTree
 
FPermissionListOwners DenyListAll
 
FSimpleMulticastDelegate OnFilterChangedDelegate
 
bool bSuppressOnFilterChanged = false
 
EPathPermissionListType ListType
 

Additional Inherited Members

- Static Protected Member Functions inherited from TSharedFromThis< FPathPermissionList >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

Set of paths that are allowd and/or denied for certain use cases. A permission list may contain

  • Blanket denial
  • Specifically denied paths
  • Specifically allowed paths In decreasing order of priority. When performing prefix checks, if a a path matches a denied path, it cannot be allowed again by a more specific allowed path. If any paths are specifically allowed, paths which do NOT match something in the allow list are implicitly denied.

Constructor & Destructor Documentation

◆ FPathPermissionList() [1/3]

FPathPermissionList::FPathPermissionList ( EPathPermissionListType  InType = EPathPermissionListType::Default)

◆ ~FPathPermissionList()

virtual PRAGMA_DISABLE_DEPRECATION_WARNINGS FPathPermissionList::~FPathPermissionList ( )
inlinevirtual

◆ FPathPermissionList() [2/3]

PRAGMA_ENABLE_DEPRECATION_WARNINGS FPathPermissionList::FPathPermissionList ( const FPathPermissionList )
default

◆ FPathPermissionList() [3/3]

FPathPermissionList::FPathPermissionList ( FPathPermissionList &&  )
default

Member Function Documentation

◆ AddAllowListItem() [1/3]

bool FPathPermissionList::AddAllowListItem ( const FName  OwnerName,
const FName  Item 
)

Add item to allowlist after which all items not in the allowlist will be filtered out.

Returns
whether the filters changed.

◆ AddAllowListItem() [2/3]

bool FPathPermissionList::AddAllowListItem ( const FName  OwnerName,
const FStringView  Item 
)

Add item to allowlist after which all items not in the allowlist will be filtered out.

Returns
whether the filters changed.

◆ AddAllowListItem() [3/3]

bool FPathPermissionList::AddAllowListItem ( const FName  OwnerName,
const TCHAR Item 
)

Add item to allowlist after which all items not in the allowlist will be filtered out.

Returns
whether the filters changed.

◆ AddDenyListAll()

bool FPathPermissionList::AddDenyListAll ( const FName  OwnerName)

Set to filter out all items.

Returns
whether the filters changed.

◆ AddDenyListItem() [1/3]

bool FPathPermissionList::AddDenyListItem ( const FName  OwnerName,
const FName  Item 
)

Add item to DenyList, this specific item will be filtered out.

Returns
whether the filters changed.

◆ AddDenyListItem() [2/3]

bool FPathPermissionList::AddDenyListItem ( const FName  OwnerName,
const FStringView  Item 
)

Add item to DenyList, this specific item will be filtered out.

Returns
whether the filters changed.

◆ AddDenyListItem() [3/3]

bool FPathPermissionList::AddDenyListItem ( const FName  OwnerName,
const TCHAR Item 
)

Add item to DenyList, this specific item will be filtered out.

Returns
whether the filters changed.

◆ Append()

bool FPathPermissionList::Append ( const FPathPermissionList Other)

Add the specified filters to this one. Rules are not applied, direct append lists.

Returns
whether the filters changed.

◆ CombinePathFilters()

FPathPermissionList FPathPermissionList::CombinePathFilters ( const FPathPermissionList OtherFilter) const

Combine two filters. Result will contain all DenyList paths combined. Result will contain AllowList paths that pass both filters.

Returns
new combined filter.

◆ ContainsDenyListItem()

bool FPathPermissionList::ContainsDenyListItem ( FStringView  Item) const

Returns whether the given path has been denied explicitly with a call to AddDenyListItem.

◆ GetAllowList()

const TMap< FString, FPermissionListOwners > & FPathPermissionList::GetAllowList ( ) const

Get raw allowlist

◆ GetAllowListEntries()

TArray< FString > FPathPermissionList::GetAllowListEntries ( ) const

Returns a copy of the paths explicity allowed in this list

◆ GetDenyList()

const TMap< FString, FPermissionListOwners > & FPathPermissionList::GetDenyList ( ) const

Get raw DenyList

◆ GetDenyListEntries()

TArray< FString > FPathPermissionList::GetDenyListEntries ( ) const

Get a copy of the paths explicity denied in this list.

◆ GetOwnerNames()

TArray< FName > FPathPermissionList::GetOwnerNames ( ) const

Gathers the names of all the owners in this DenyList.

◆ HasAllowListEntries()

bool FPathPermissionList::HasAllowListEntries ( ) const

Returns whether this list has any explicitly allowed paths, which will lead to it denying access to any paths not listed.

◆ HasDenyListEntries()

bool FPathPermissionList::HasDenyListEntries ( ) const

Returns whether this list has any explicitly denied paths.

◆ HasFiltering()

bool FPathPermissionList::HasFiltering ( ) const

True if has filters active

◆ IsDenyListAll()

bool FPathPermissionList::IsDenyListAll ( ) const
inline

Are all items set to be filtered out

◆ OnFilterChanged()

FSimpleMulticastDelegate & FPathPermissionList::OnFilterChanged ( )
inline

Triggered when filter changes

◆ operator=() [1/2]

FPathPermissionList & FPathPermissionList::operator= ( const FPathPermissionList )
default

◆ operator=() [2/2]

FPathPermissionList & FPathPermissionList::operator= ( FPathPermissionList &&  )
default

◆ PassesFilter() [1/3]

bool FPathPermissionList::PassesFilter ( const FName  Item) const

Returns true if passes filter restrictions using exact match

◆ PassesFilter() [2/3]

bool FPathPermissionList::PassesFilter ( const FStringView  Item) const

Returns true if passes filter restrictions using exact match

◆ PassesFilter() [3/3]

bool FPathPermissionList::PassesFilter ( const TCHAR Item) const

Returns true if passes filter restrictions using exact match

◆ PassesStartsWithFilter() [1/3]

bool FPathPermissionList::PassesStartsWithFilter ( const FName  Item,
const bool  bAllowParentPaths = false 
) const

Returns true if passes filter restrictions for path

◆ PassesStartsWithFilter() [2/3]

bool FPathPermissionList::PassesStartsWithFilter ( const FStringView  Item,
const bool  bAllowParentPaths = false 
) const

Returns true if passes filter restrictions for path

◆ PassesStartsWithFilter() [3/3]

bool FPathPermissionList::PassesStartsWithFilter ( const TCHAR Item,
const bool  bAllowParentPaths = false 
) const

Returns true if passes filter restrictions for path

◆ PassesStartsWithFilterRecursive()

EPathPermissionPrefixResult FPathPermissionList::PassesStartsWithFilterRecursive ( const FStringView  Item,
const bool  bAllowParentPaths = false 
) const

Checks the given path against the restrictions and return whether it's possible for any child paths to succeed or fail as well. Returning PassRecursive or FailRecursive guarantees that no child paths of the queried path can fail or pass the filter respectively. Returning Pass or Fail does not guarantee that there is some path which fails or passes the filter respectively.

Examples:

Given no deny or allow lists: Inputs: / -> PassRecursive, because no paths can fail to match the allow list or match the deny list.

Given a deny-list entry: Allow: empty Deny: /Secret Inputs: / -> Pass, because some children of this path may be denied. /Secret -> FailRecursive, because this path is denied and all children will also be denied. /Public -> PassRecursive, because this path is not demied and no children can be denied.

Given an allow-list entry: Allow: /JustThis Deny: empty Inputs: / -> Fail /JustThis -> PassRecursive /SomethingElse -> FailRecursive

Given both allow and deny-lists: Allow: /Stuff Deny: /Stuff/Secret Inputs: / -> Fail /Stuff -> Pass /Stuff/Secret -> Fail /Stuff/Public -> PassRecursive

◆ RemoveAllowListItem() [1/3]

bool FPathPermissionList::RemoveAllowListItem ( const FName  OwnerName,
const FName  Item 
)

Remove item from the AllowList

Returns
whether the filters changed

◆ RemoveAllowListItem() [2/3]

bool FPathPermissionList::RemoveAllowListItem ( const FName  OwnerName,
const FStringView  Item 
)

Remove item from the AllowList

Returns
whether the filters changed

◆ RemoveAllowListItem() [3/3]

bool FPathPermissionList::RemoveAllowListItem ( const FName  OwnerName,
const TCHAR Item 
)

Remove item from the AllowList

Returns
whether the filters changed

◆ RemoveDenyListItem() [1/3]

bool FPathPermissionList::RemoveDenyListItem ( const FName  OwnerName,
const FName  Item 
)

Remove item from the DenyList

Returns
whether the filters changed

◆ RemoveDenyListItem() [2/3]

bool FPathPermissionList::RemoveDenyListItem ( const FName  OwnerName,
const FStringView  Item 
)

Remove item from the DenyList

Returns
whether the filters changed

◆ RemoveDenyListItem() [3/3]

bool FPathPermissionList::RemoveDenyListItem ( const FName  OwnerName,
const TCHAR Item 
)

Remove item from the DenyList

Returns
whether the filters changed

◆ RemoveDenyListItemAndGetOwners()

FPermissionListOwners FPathPermissionList::RemoveDenyListItemAndGetOwners ( FStringView  Item)

Removes an item from the deny list and returns a list of all the owners of that item so that the item can be re-introduced.

◆ ToString()

FString FPathPermissionList::ToString ( ) const

Dumps the path permission list details into a multi-line string

◆ UnregisterOwner()

bool FPathPermissionList::UnregisterOwner ( const FName  OwnerName)

Removes all filtering changes associated with a specific owner name.

Returns
whether the filters changed.

◆ UnregisterOwners()

bool FPathPermissionList::UnregisterOwners ( const TArray< FName > &  OwnerNames)

Removes all filtering changes associated with the specified list of owner names.

Returns
whether the filters changed.

◆ UnregisterOwnersAndAppend()

bool FPathPermissionList::UnregisterOwnersAndAppend ( const TArray< FName > &  OwnerNamesToRemove,
const FPathPermissionList FiltersToAdd 
)

Unregisters specified owners then adds specified filters in one operation (to avoid multiple filters changed events).

Returns
whether the filters changed.

◆ VerifyItemMatchesListType()

void FPathPermissionList::VerifyItemMatchesListType ( const FStringView  Item) const
protected

Checks if an item is of a valid format for this list

Returns
True if the item passes list type test.

Member Data Documentation

◆ AllowTree

TDirectoryTree<FPermissionListOwners> FPathPermissionList::AllowTree
protected

Compiled path tree produced from AllowList

◆ bSuppressOnFilterChanged

bool FPathPermissionList::bSuppressOnFilterChanged = false
protected

Temporarily prevent delegate from being triggered

◆ DenyListAll

FPermissionListOwners FPathPermissionList::DenyListAll
protected

List of owner names that requested all items to be filtered out

◆ DenyTree

TDirectoryTree<FPermissionListOwners> FPathPermissionList::DenyTree
protected

Compiled path tree produced from DenyList

◆ ListType

EPathPermissionListType FPathPermissionList::ListType
protected

Type of paths this list represent

◆ OnFilterChangedDelegate

FSimpleMulticastDelegate FPathPermissionList::OnFilterChangedDelegate
protected

Triggered when filter changes


The documentation for this class was generated from the following files: