Checks user permissions and application context to determine if the specified command is currently available.

public static bool IsCommandPermitted( 
string cmd
object arg 
)

Parameters

cmd

Type: string

The name of the command.

arg

Type: object

An optional argument that provides relevant context. Typically, this parameter is not required.

Return Value

True if the command is currently permitted (per the user's authorization) and if the application context is suitable. Otherwise, false.