Server/User Info Page

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE page SYSTEM "xmlschemas/domino_9_0_1.dtd">
<page xmlns="http://www.lotus.com/dxl" name="Server" publicaccess="false" renderpassthrough="true">
	<body>
		<richtext>
			<pardef id="1"/>
			<par def="1"/>
			<table widthtype="fitmargins" refwidth="15.5417in">
				<tablecolumn width="1.5000in"/>
				<tablecolumn width="100%"/>
				<tablerow>
					<tablecell>
						<pardef id="3" keepwithnext="true" keeptogether="true"/>
						<par def="3">Viewing </par>
					</tablecell>
					<tablecell>
						<pardef id="4" keepwithnext="true" keeptogether="true"/>
						<par def="4">
							<computedtext>
								<code event="value">
									<formula>@ServerName</formula>
								</code>
							</computedtext>
						</par>
					</tablecell>
				</tablerow>
				<tablerow>
					<tablecell>
						<par def="3">Username </par>
					</tablecell>
					<tablecell>
						<par def="4">
							<computedtext>
								<code event="value">
									<formula>@UserName</formula>
								</code>
							</computedtext>
						</par>
					</tablecell>
				</tablerow>
				<tablerow>
					<tablecell>
						<par def="3">Names List </par>
					</tablecell>
					<tablecell>
						<par def="4">
							<computedtext>
								<code event="value">
									<formula>@UserNamesList</formula>
								</code>
							</computedtext>
						</par>
					</tablecell>
				</tablerow>
				<tablerow>
					<tablecell>
						<par def="3">Access Level Name</par>
					</tablecell>
					<tablecell>
						<par def="4">
							<computedtext>
								<code event="value">
									<formula>@Explode("Depositor Reader Author Editor Designer Manager")[@ToNumber(@UserAccess(@DbName; [AccessLevel]))]</formula>
								</code>
							</computedtext>
						</par>
					</tablecell>
				</tablerow>
				<tablerow>
					<tablecell>
						<par def="3">User Access</par>
					</tablecell>
					<tablecell>
						<par def="4">
							<computedtext>
								<code event="value">
									<formula>@Implode(
	"Access Level":"Create Documents":"Delete Documents":"Create Personal Agents":
		"Create Personal Folders and Views":"Create Shared Folders and Views":
		"Create Agents":"Read Public Documents":"Write Public Documents" +
	": " +
	@UserAccess(@DbName);
	@NewLine
)</formula>
								</code>
							</computedtext>
						</par>
					</tablecell>
				</tablerow>
			</table>
			<par def="1"/>
			<par def="1"/>
		</richtext>
	</body>
	<item name="$$ScriptName" summary="false" sign="true">
		<text>Server</text>
	</item>
</page>





This is a variant of a Page (as in, the old-style design element) I keep around for some troubleshooting uses. It shows you the current server you're accessing (for clustered environments), the effective user name, the names list, and the effective access to the current DB. I like having this around in a designated "server test" DB or in an active dev database for trying to track down the specifics of an access/user problem.

XML
Jesse Gallagher
October 17, 2016 9:19 AM
Rating
13

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



No comments yetLogin first to comment...