Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5c1efebb
Commit
5c1efebb
authored
Sep 01, 2005
by
Leigh B. Stoller
Browse files
Minor formatting and readability changes as requested by Jay.
parent
0025e057
Changes
3
Hide whitespace changes
Inline
Side-by-side
wiki/usertemplate.in
View file @
5c1efebb
This is your TWiki home page.
Feel free to customize it! If you ar
e
not familiar with the
%WIKITOOLNAME% collaboration platform, please
visit
%TWIKIWEB%.WelcomeGuest first. See the links at your left for
more
information on how to write and create TWiki pages.
This is your TWiki home page.
If you are not familiar with th
e
%WIKITOOLNAME% collaboration platform, please
visit
%TWIKIWEB%.WelcomeGuest first. See the links at your left for
more
information on how to write and create TWiki pages.
__These are your Projects
/Groups
:__
__These are your Projects:__
<!-- Please leave this line here. Thanks! --!>
<br><br>
<font size=-2 color=grey>
__Permissions (leave these alone unless you know what you are doing, or ask us)__
* Set ALLOWTOPICVIEW =
* Set ALLOWTOPICCHANGE =
...
...
@@ -21,4 +25,4 @@ __Personal Preferences (details in %TWIKIWEB%.TWikiVariables)__
* Set EDITBOXHEIGHT = 17
* Default state of the __link__ check box in the attach file page:
* Set ATTACHLINKBOX =
</font>
wiki/webhometemplate.in
View file @
5c1efebb
...
...
@@ -11,14 +11,14 @@ information on how to write and create TWiki pages.
__This project wiki can be accessed externally as:__ [[%SCRIPTURL%/view/%WEB%][%SCRIPTURL%/view/%WEB%]]
%INCLUDE{"Emulab.GroupPermNotes"}%
__TWiki groups that are relevant to your Project/Group__
* Other members of your project: [[%MAINWEB%.%WEB%Group][%WEB%Group]]
* Members with project root privs: [[%MAINWEB%.%WEB%RootGroup][%WEB%RootGroup]]
%INCLUDE{"Emulab.GroupPermNotes"}%
__Site Tools of the <nop>%WEB% Web__
%INCLUDE{"%TWIKIWEB%.WebSiteTools"}%
...
...
wiki/wikiproxy.in
View file @
5c1efebb
...
...
@@ -112,6 +112,9 @@ elsif ($action eq "remap") {
elsif
(
$action
eq
"
fixproject
")
{
exit
(
FixWikiProject
(
@ARGV
));
}
elsif
(
$action
eq
"
fixuser
")
{
exit
(
FixWikiUser
(
@ARGV
));
}
else
{
die
("
*** $0:
\n
"
.
"
Do not know what to do with '
$action
'!
\n
");
...
...
@@ -549,6 +552,61 @@ sub FixWikiProject(@)
return
0
;
}
#
# Fix a wiki user home page,
#
sub
FixWikiUser
(@)
{
usage
()
if
(
@
_
!=
2
);
my
(
$user
,
$wikiname
,
$passwd
)
=
@_
;
chdir
("
$WIKIUSERDIR
")
or
fatal
("
Could not chdir to
$WIKIUSERDIR
");
if
(
!
system
("
egrep -q -s
"
.
"
'<!-- Please leave this line here'
${wikiname}
.txt
"))
{
return
0
;
}
system
("
cp -p
${USERTEMPLATE}
${wikiname}
.txt
")
==
0
or
fatal
("
Could not copy
${USERTEMPLATE}
to
${wikiname}
.txt
");
#
# Set the initial groups list to the user.
#
open
(
PREFS
,
"
${wikiname}
.txt
")
or
fatal
("
Could not open
${wikiname}
.txt for reading
");
while
(
<
PREFS
>
)
{
if
(
$_
=~
/^(.* Set ALLOWTOPIC.*)\r$/
||
$_
=~
/^(.* Set ALLOWTOPIC.*)$/
)
{
$data
.=
$
1
.
"
%MAINWEB%.
${wikiname}
\n
";
}
else
{
$data
.=
$_
;
}
}
close
(
PREFS
);
#
# Now write the file out.
#
open
(
PREFS
,
"
>
${wikiname}
.txt
")
or
fatal
("
Could not open
${wikiname}
.txt for writing
");
print
PREFS
$data
;
close
(
PREFS
);
#
# Check it in (locked).
#
CI
("
${wikiname}
.txt
",
"
FixWikiUser
$user
$wikiname
")
==
0
or
fatal
("
Could not ci
${wikiname}
.txt
");
return
0
;
}
#
# Fix a wiki group.
#
...
...
@@ -740,19 +798,16 @@ sub SetWikiGroups(@)
fatal
("
Could not open
${wikiuser}
.txt for reading
");
while
(
<
PREFS
>
)
{
if
(
$_
=~
/^
(
__These are your Projects
\/Groups:__)
.*$/
)
{
$data
.=
$
1
.
"
\n
";
if
(
$_
=~
/^__These are your Projects.*$/
)
{
$data
.=
"
__These are your Projects:__
\n
";
#
# Add a list of
group
s.
# Add a list of
just the Project
s.
#
foreach
my
$group
(
@groups
)
{
if
(
-
d
"
../
$group
")
{
$data
.=
"
\t
* [[
${group}
.WebHome][
${group}
]]
\n
";
}
else
{
$data
.=
"
\t
* [[%MAINWEB%.
${group}
Group][
${group}
Group]]
\n
";
}
}
#
...
...
Write
Preview
Supports
Markdown
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