Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
fe8c4d11
Commit
fe8c4d11
authored
Jan 09, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cssification
parent
ec335004
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
301 additions
and
145 deletions
+301
-145
lib/python/Products/SiteAccess/www/AccessRuleAdd.dtml
lib/python/Products/SiteAccess/www/AccessRuleAdd.dtml
+46
-23
lib/python/Products/SiteAccess/www/SiteRootAdd.dtml
lib/python/Products/SiteAccess/www/SiteRootAdd.dtml
+81
-26
lib/python/Products/SiteAccess/www/SiteRootEdit.dtml
lib/python/Products/SiteAccess/www/SiteRootEdit.dtml
+79
-42
lib/python/Products/SiteAccess/www/VirtualHostMonster.dtml
lib/python/Products/SiteAccess/www/VirtualHostMonster.dtml
+42
-35
lib/python/Products/SiteAccess/www/VirtualHostMonsterAdd.dtml
...python/Products/SiteAccess/www/VirtualHostMonsterAdd.dtml
+53
-19
No files found.
lib/python/Products/SiteAccess/www/AccessRuleAdd.dtml
View file @
fe8c4d11
<html><head><title>
Set the Access Rule
</title>
<dtml-var manage_page_header>
</head>
<body
bgcolor=
"#FFFFFF"
link=
"#000099"
vlink=
"#555555"
>
<h2>
Set the Access Rule
</h2>
<h4>
WARNING: Access Rules are powerful, and can temporarily disable
<dtml-var "manage_form_title(this(), _,
form_title='Set Access Rule',
)">
<p class="form-help">
<strong>
WARNING: Access Rules are powerful, and can temporarily disable
Zope access! Don't use them unless you have read all about them and
Zope access! Don't use them unless you have read all about them and
know how to recover from mistakes!
</h4>
know how to recover from mistakes!
</strong>
</p>
<p>
In the form below
<em>
Rule Id
</em>
is the Id of an object in this
<p class="form-help">
Zope Folder which will be called whenever the Folder is published. It
In the form below <em>rule id</em> is the id of an object in this
can implement rewrite rules, preload request variables, etc.
Zope Folder which will be called whenever the Folder is published.
It can implement rewrite rules, preload request variables, etc.
</p>
</p>
<dtml-if "manage_getAccessRule(this())">
<dtml-if "manage_getAccessRule(this())">
<p>
The current Access Rule is
<p class="form-text">
The current Access Rule is
<a href="<dtml-var "'%s/%s/manage_workspace' % (this().absolute_url(), manage_getAccessRule(this()))">">
<a href="<dtml-var "'%s/%s/manage_workspace' % (this().absolute_url(), manage_getAccessRule(this()))">">
"
<dtml-var
"
manage_getAccessRule
(
this
())"
>
"
</a>
.
</p>
"<dtml-var "manage_getAccessRule(this())">"</a>.
</p>
<dtml-else>
<dtml-else>
<p>
No Access Rule is currently set.
</p>
<p class="form-text">
No Access Rule is currently set.
</p>
</dtml-if>
</dtml-if>
<form action="manage_addAccessRule" method="post">
<form action="manage_addAccessRule" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<table>
<tr>
<tr>
<th
align=
'LEFT'
><em>
Rule Id
<em></th>
<td align="left" valign="top">
<td
align=
'LEFT'
><input
name=
"method_id"
size=
"80"
>
<div class="form-label">
</td></tr>
Rule Id
<tr><td
colspan=
2
>
</div>
<input
type=
"SUBMIT"
name=
"submit"
value=
" Set Rule "
>
</td>
<input
type=
"SUBMIT"
name=
"none"
value=
" No Access Rule "
>
<td align="left" valign="top">
</td></tr>
<input type="text" name="method_id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="SUBMIT" name="submit" value=" Set Rule ">
<input class="form-element" type="SUBMIT" name="none" value=" No Access Rule ">
</div>
</td>
</tr>
</table>
</table>
</form>
</form>
</body></html>
<dtml-var manage_page_footer>
lib/python/Products/SiteAccess/www/SiteRootAdd.dtml
View file @
fe8c4d11
<HTML><HEAD><TITLE>Add a SiteRoot</TITLE>
<dtml-var manage_page_header>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<dtml-var "manage_form_title(this(), _,
<H2>Add a SiteRoot</H2>
form_title='Add SiteRoot',
<p>This will change URLs generated by all objects within the same container
)">
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
found) then it will replace the host:port/script portion of generated URLs.
<p class="form-help">
This will change URLs generated by all objects within the same container
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
found) then it will replace the host:port/script portion of generated URLs.
If a Path is specified (or a SiteRootPATH value can be found) then it will
If a Path is specified (or a SiteRootPATH value can be found) then it will
replace the remainder of each URL.</p>
replace the remainder of each URL.
<p>Values affected include DTML variables starting with URL or BASE, and
</p>
the absolute_url() methods of objects.</p>
<p>If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
<p class="form-help">
and then search the REQUEST for it. The same holds for Path and SiteRootPATH.</p>
Values affected include DTML variables starting with URL or BASE, and
<p>Base (if specified) should <strong>always</strong> start with "http://"</p>
the absolute_url() methods of objects.
</p>
<p class="form-help">
If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
and then search the REQUEST for it. The same holds for Path and
SiteRootPATH.
</p>
<p class="form-help">
Base (if specified) should <strong>always</strong> start with
"http://"
</p>
<form action="manage_addSiteRoot" method="post">
<form action="manage_addSiteRoot" method="post">
<table>
<table cellspacing="0" cellpadding="2" border="0">
<tr> <th align='LEFT'>Id</th>
<tr>
<td align='LEFT'>SiteRoot</td></tr>
<td align="left" valign="top">
<tr> <th align='LEFT'><em>Title<em></th>
<div class="form-label">
<td align='LEFT'><input name="title" size="40"></td></tr>
Id
<tr> <th align='LEFT'><em>Base<em></th>
</div>
<td align='LEFT'><input name="base" size="40"></td></tr>
</td>
<tr> <th align='LEFT'><em>Path<em></th>
<td align="left" valign="top">
<td align='LEFT'><input name="path" size="40" value="/"></td></tr>
<input type="text" name="id" size="40" />
<tr><td colspan=2>
</td>
<input type="SUBMIT" name="submit" value=" Add ">
</tr>
</td></tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Base
</div>
</td>
<td align="left" valign="top">
<input type="text" name="base" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Path
</div>
</td>
<td align="left" valign="top">
<input type="text" name="path" size="40" value="/" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</table>
</form>
</form>
</body></html>
<dtml-var manage_page_footer>
lib/python/Products/SiteAccess/www/SiteRootEdit.dtml
View file @
fe8c4d11
<html>
<dtml-var manage_page_header>
<head>
<title>
Edit
<dtml-var
title_or_id
></title>
</head>
<body
bgcolor=
"#ffffff"
link=
"#000099"
vlink=
"#555555"
alink=
"#77003b"
>
<dtml-var manage_tabs>
<dtml-var manage_tabs>
<h2>
Edit
<dtml-var
id
></h2>
<p class="form-help">
<p>
This will change URLs generated by all objects within the same container
This will change URLs generated by all objects within the same container
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be
found) then it will replace the host:port/script portion of generated URLs.
found) then it will replace the host:port/script portion of generated URLs.
If a Path is specified (or a SiteRootPATH value can be found) then it will
If a Path is specified (or a SiteRootPATH value can be found) then it will
replace the remainder of each URL.
</p>
replace the remainder of each URL.
<p>
Values affected include DTML variables starting with URL or BASE, and
</p>
the absolute_url() methods of objects.
</p>
<p>
If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
<p class="form-help">
and then search the REQUEST for it. The same holds for Path and SiteRootPATH.
</p>
Values affected include DTML variables starting with URL or BASE, and
<p>
Base (if specified) should
<strong>
always
</strong>
start with "http://"
</p>
the absolute_url() methods of objects.
</p>
<p class="form-help">
If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE
and then search the REQUEST for it. The same holds for Path and SiteRootPATH.
</p>
<p class="form-help">
Base (if specified) should <strong>always</strong> start with "http://"
</p>
<form action="manage_edit" method="POST">
<form action="manage_edit" method="POST">
<table
cellspacing=
"2"
>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<tr>
<th
align=
"left"
valign=
"top"
><em>
Title
</em></th>
<td align="left" valign="top">
<td
align=
"left"
valign=
"top"
>
<div class="form-label">
<input
type=
"text"
name=
"title"
size=
"40"
value=
"&dtml-title;"
>
Id
</td>
</div>
</tr>
</td>
<tr>
<td align="left" valign="top">
<th
align=
"left"
valign=
"top"
><em>
Base
</em></th>
<input type="text" name="id" size="40" />
<td
align=
"left"
valign=
"top"
>
</td>
<input
type=
"text"
name=
"base"
size=
"40"
value=
"<dtml-if base>&dtml-base;</dtml-if>"
>
</tr>
</td>
<tr>
</tr>
<td align="left" valign="top">
<tr>
<div class="form-optional">
<th
align=
"left"
valign=
"top"
><em>
Path
</em></th>
Title
<td
align=
"left"
valign=
"top"
>
</div>
<input
type=
"text"
name=
"path"
size=
"40"
value=
"<dtml-if path>&dtml-path;</dtml-if>"
>
</td>
</td>
<td align="left" valign="top">
</tr>
<input type="text" name="title" size="40"
<tr><td></td>
value="<dtml-if title>&dtml-title;</dtml-if>" />
<td
align=
"left"
valign=
"top"
>
</td>
<input
type=
"submit"
name=
"submit"
value=
" Change "
>
</tr>
</td>
<tr>
</tr>
<td align="left" valign="top">
<div class="form-optional">
Base
</div>
</td>
<td align="left" valign="top">
<input type="text" name="base" size="40"
value="<dtml-if base>&dtml-base;</dtml-if>" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Path
</div>
</td>
<td align="left" valign="top">
<input type="text" name="path" size="40" value="/"
value="<dtml-if path>&dtml-path;</dtml-if>" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value="Save Changes" />
</div>
</td>
</tr>
</table>
</table>
</form>
</form>
</body>
<
/html
>
<
dtml-var manage_page_footer
>
lib/python/Products/SiteAccess/www/VirtualHostMonster.dtml
View file @
fe8c4d11
<html>
<dtml-var manage_page_header>
<head>
<title><dtml-var
title_or_id
></title>
</head>
<body
bgcolor=
"#ffffff"
link=
"#000099"
vlink=
"#555555"
alink=
"#77003b"
>
<dtml-var manage_tabs>
<dtml-var manage_tabs>
<p>
This Virtual Host Monster changes the URLs generated inside of the
<p class="form-help">
Folder in which it is placed, using information passed to it in special URL
This Virtual Host Monster changes the URLs generated inside of the
path elements. Its purpose is to support virtual hosting, by
Folder in which it is placed, using information passed to it in special URL
allowing you to centrally control the protocol, host, and path of the
path elements. Its purpose is to support virtual hosting, by
URLs that Zope generates.
</p>
allowing you to centrally control the protocol, host, and path of the
<p>
&dtml-id;
doesn't do anything unless you insert one or both of the
URLs that Zope generates.
following special path elements into a URL:
<i>
VirtualHostBase
</i>
sets the protocol and host, while
<i>
VirtualHostRoot
</i>
sets the path root. You would insert
these path elements using an Apache RewriteRule or ProxyPass
directive, or with a Zope Access Rule.
</p>
<p>
If the URL path of a request begins with
"
/VirtualHostBase/http/www.foo.com
"
, for instance, then
URLs generated by Zope will start with
<b>
http://www.foo.com
</b>
.
</p><p>
If the URL contains
<i>
VirtualHostRoot
</i>
, then
all path elements up to that point are removed from generated URLs.
For instance, a request with path
"
/a/b/c/VirtualHostRoot/d
"
will generate a URL with path
<b>
/d
</b>
.
</p>
</p>
<p>
<p class="form-help">
Combining both allows you to cause a subfolder to act as the root of a
This object doesn't do anything unless you insert one
site. For example, to publish Folder
"
/foo
"
as
or both of the following special path elements into a URL:
<b>
http://www.foo.com/
</b>
, put a Virtual Host Monster in the root
<em>VirtualHostBase</em> sets the protocol and host, while
folder and rewrite requests for that URL to
<em>VirtualHostRoot</em> sets the path root. You would insert
<b>
/VirtualHostBase/http/www.foo.com/foo/VirtualHostRoot/
</b>
these path elements using an Apache RewriteRule or ProxyPass
directive, or with a Zope Access Rule.
</p>
<p class="form-help">
If the URL path of a request begins with
"/VirtualHostBase/http/www.foo.com", for instance, then
URLs generated by Zope will start with <strong>http://www.foo.com</strong>.
</p>
<p class="form-help">
If the URL contains <em>VirtualHostRoot</em>, then
all path elements up to that point are removed from generated URLs.
For instance, a request with path "/a/b/c/VirtualHostRoot/d"
will generate a URL with path <strong>/d</strong>.
</p>
</p>
<p>
Values affected include DTML variables starting with URL or BASE
<p class="form-help">
(such as URL1, BASE2, URLPATH0), and
Combining both allows you to cause a subfolder to act as the root of a
the absolute_url() methods of objects.
</p>
site. For example, to publish Folder "/foo" as
</body>
<strong>http://www.foo.com/</strong>, put a Virtual Host Monster in the root
</html>
folder and rewrite requests for that URL to
<strong>/VirtualHostBase/http/www.foo.com/foo/VirtualHostRoot/</strong>
</p>
<p class="form-help">
Values affected include DTML variables starting with URL or BASE
(such as URL1, BASE2, URLPATH0), and
the absolute_url() methods of objects.
</p>
<dtml-var manage_page_footer>
lib/python/Products/SiteAccess/www/VirtualHostMonsterAdd.dtml
View file @
fe8c4d11
<
HTML><HEAD><TITLE>Add a Virtual Host Monster</TITLE
>
<
dtml-var manage_page_header
>
</HEAD>
<
BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<
dtml-var "manage_form_title(this(), _,
<H2>Add a Virtual Host Monster</H2>
form_title='Add Virtual Host Monster',
<form action="manage_addVirtualHostMonster" method="post
">
)
">
<b>Id:</b> <input name="id" size="40">
<
input type="SUBMIT" name="submit" value=" Add
">
<
p class="form-help
">
</form>
A Virtual Host Monster changes the URLs generated by all objects
<p>
within the same Folder, using information passed to it in special URL
<i>This is only useful if you are using some rewriting tool
path elements. This is useful if you are using some rewriting tool
(Apache or an Access Rule, for example) to insert these special
(Apache or an Access Rule, for example) to insert these special
elements into your URL.
</i><br><br>
elements into your URL.
A Virtual Host Monster changes the URLs generated by all objects
</p>
within the same Folder, using information passed to it in special URL
path elements.<br><br
>
<p class="form-help"
>
To set the protocol ('http', 'https') and host ('www.foo.com') portion
To set the protocol ('http', 'https') and host ('www.foo.com') portion
of generated URLs, insert "VirtualHostBase", the protocol,
of generated URLs, insert "VirtualHostBase", the protocol,
and the host into the path.<br><br>
and the host into the path.
</p>
<p class="form-help">
Insert "VirtualHostRoot" directly after the name of the
Insert "VirtualHostRoot" directly after the name of the
Folder that is supposed to be the root of the virtual host.<br><br>
Folder that is supposed to be the root of the virtual host.<br><br>
For example, to publish Folder "/foo" as <b>http://www.foo.com/</b>,
For example, to publish Folder "/foo" as <b>http://www.foo.com/</b>,
put a Virtual Host Monster in the root folder and rewrite requests for that
put a Virtual Host Monster in the root folder and rewrite requests for that
URL to <b>/VirtualHostBase/http/www.foo.com/foo/VirtualHostRoot/</b>
URL to <b>/VirtualHostBase/http/www.foo.com/foo/VirtualHostRoot/</b>
</p>
</p>
<p>Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.</p>
<p class="form-help">
</body></html>
Values affected include DTML variables starting with URL or BASE, and
the absolute_url() methods of objects.
</p>
<form action="manage_addVirtualHostMonster" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment