Daya Bay Reactor Neutrino Experiment TWiki > AllowWebCreateByUserMappingManager Daya Bay webs:
Public | 中文 | Internal | Help

Log In or Register

Allowing Web Creation by the User Mapping Manager

Motivation

There are cases where DENYROOTCHANGE, ALLOWROOTCHANGE, DENYWEBCHANGE, and ALLOWWEBCHANGE are not capable enough to implement web creation permission you want. For example, you may want to allow a user to create a certain subweb of the web Foo while you don't want to allow to create topics on the web Foo. To cope with such cases, a method in the user mapping manager is called to check the web creation is allowed before checking the access control variables.

A large TWiki site in a large organization employing UserSubwebs

Let's assume:

Implication:

UsingMultipleDisks and /pub/... rewritten to /cgi-bin/viewfiles/...

Let's assume:

Implication:

How it works

When a new web is created, the canCreateWeb($cUID, $web) method of the user mapping manager is called if the method exists. If the method returns true, TWiki goes ahead and create the web without checking DENYROOTCHANGE and ALLOWROOTCHANGE (for a top level web) or DENYWEBCHANGE and ALLOWWEBCHANGE (of the parent of a subweb). If the method does not exist or the method returns false, web creation is permitted as usual based on ROOTCHANGE or ALLOWWEBCHANGE.

Maybe needless to say, the method would be written as follows.

sub canCreateWeb {
    my( $this, $cUID, $web ) = @_;
...
}

Related Topics: AdminDocumentationCategory, TWikiAccessControl, UserSubwebs



Revision: r1 - 2012-10-19 - 15:54:27 - TWikiContributor

Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Daya Bay? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.AllowWebCreateByUserMappingManager.