PublicAPI.Docflow.Document.AddDocumentCreatePermission ELMA API Documentation
Add the user permissions to create documents of a certain type
 
 
Syntax

public void AddDocumentCreatePermission(
	User user,
	Type type
)

Parameters

user
Type: User
User, the permissions need to be granted to. Object. Access path: PublicAPI.Portal.Security.User
type
Type: System Type
Document Type
Remarks

The knowledge base article on this subject
Examples

//load the user by ID 
var user = PublicAPI.Portal.Security.User.Load(3);
//load the document by ID 
var doc = PublicAPI.Docflow.Document.Load(3);
//get the document type 
var type = doc.GetType();

//add the permissions
PublicAPI.Docflow.Document.AddDocumentCreatePermission(user, type);
See Also