Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Changed: | ||||||||
< < | Allowing Web Creation by the User Mapping Manager | |||||||
> > | Allowing Web Creation, Deletion, & Rename by the User Mapping Manager | |||||||
Motivation | ||||||||
Changed: | ||||||||
< < | 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 UserSubwebsLet's assume:
UsingMultipleDisks and /pub/... rewritten to /cgi-bin/viewfiles/...Let's assume:
| |||||||
> > | There are cases where DENYROOTCHANGE, ALLOWROOTCHANGE, DENYWEBCHANGE, and ALLOWWEBCHANGE are not capable enough to implement web creation/deletion/rename permission you want.
Here are some of those situations.
Making top level web creation and deletion self-serviceUsually, to create and delete a top level web, you need to be allowed by ALLOWROOTCHANGE and DENYROOTCHANGE. On a large TWiki site, it's desirable to make top level web creation and deletion self-service.
Allowing users to create and delete their own UserSubwebsIn a large orgnization having thousands or more users, the Main web needs to restrict topic creation to prevent random topics to accumulate. Instead, UserSubwebs are desirable for content accountability. This means that, on the Main web, users are not allowed to create topics but are allowed to create and delete the subweb of their wiki name. | |||||||
How it works
When a new web is created, the | ||||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | If the method returns true, the web is created 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 *WEBCHANGE. | |||||||
Changed: | ||||||||
< < | Maybe needless to say, the method would be written as follows. | |||||||
> > | The method would be written as follows. | |||||||
sub canCreateWeb { my( $this, $cUID, $web ) = @_; | ||||||||
Line: 46 to 31 | ||||||||
} | ||||||||
Changed: | ||||||||
< < | Related Topics: AdminDocumentationCategory, TWikiAccessControl, UserSubwebs | |||||||
> > | Similarly, when a web is renamed, the canRenameWeb($cUID, $oldWeb, $newWeb) method of the user mapping manager is called if the method exist.
If it returns true, permission check on the parent web is omitted.
If the method does not exist or the method returns false, permission check on the parent web is conducted as usual.
Then, permission check on the rename destination takes place.
Related Topics: AdminDocumentationCategory, TWikiAccessControl, LargeSite, UserSubwebs |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > | Allowing Web Creation by the User Mapping Manager
MotivationThere 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 UserSubwebsLet's assume:
UsingMultipleDisks and /pub/... rewritten to /cgi-bin/viewfiles/...Let's assume:
How it works
When a new web is created, the Maybe needless to say, the method would be written as follows. sub canCreateWeb { my( $this, $cUID, $web ) = @_; ... } Related Topics: AdminDocumentationCategory, TWikiAccessControl, UserSubwebs |