Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
true if the property exists, false otherwise
A user can always work with her own data. For other accounts the caller must have the GlobalGroupAdmin user right.
When using the system application you can expect to find the following properties.
[This is preliminary documentation and is subject to change.]
Test if a named property exists in an application for the calling user.
Namespace: ContentStudio.Security
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public bool ExistsProperty( ConnectionId connectionId, SessionId sessionId, string application, string property )
Parameters
- connectionId
- Type: ContentStudioConnectionId
A value that identifies the web site - sessionId
- Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). - application
- Type: SystemString
The name of the application where the property are to be found. For the system application a dot (.) can be used.
All application names are case-sensitive
This parameter cannot be null (Nothing in Visual Basic) or Empty. - property
- Type: SystemString
The name of a property to test All property names are case-sensitive
This parameter cannot be null (Nothing in Visual Basic) or Empty.
Return Value
Type: Booleantrue if the property exists, false otherwise
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The Application argument was null |
ArgumentException | The Application argument was Empty. |
CSException | A business rule was violated in the underlying Content Studio database.
The following numbered exceptions are common:
|
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Remarks
- title
- office
- address
- zip
- city
- country
- phone
- cellphone
- fax
- company
- homephone
- startdoc (the user's start page in Content Studio)
- infodoc (the user's personal page in Content Studio)
- webviewbool (indicates whether to display the tree view in Content Studio or not)
- pflang (indicates the user's preferred language setting)
Examples
The following code shows how to examine whether the property Data1 in the application MyApp exists for the calling user and if so, it deletes that property.
try { UserProperty upo = new UserProperties(); if(upo.ExistsProperty(CS_ConnectionId, CS_UserSessionId, "MyApp", "Data1")) { upo.DeleteProperty(CS_ConnectionId, CS_UserSessionId, "", Trustee.UserIdentifiers.None, "MyApp.Data1"); } } catch (Exception ex) { Response.Write(Server.HtmlEncode(ex.Message)); }
See Also