<% | |
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ | |
var privilegesInfo = sling.getService(Packages.org.apache.sling.jackrabbit.usermanager.AuthorizablePrivilegesInfo); | |
if (!privilegesInfo.canAddGroup(currentSession)) { | |
//user can't create groups. | |
response.sendError(403); | |
} else { | |
var rb = request.getResourceBundle("org.apache.sling.usermgr.Resources", null); | |
%> | |
<div class="ui-widget ui-widget-content ui-corner-all usermgmt-body" id="create-group-body" > | |
<h3 class="ui-widget-header ui-corner-all usermgmt-header"><%=rb.getString("page.title.create.group")%></h3> | |
<div class="info-msg-block" style="display:none;"> | |
<div class="ui-state-highlight ui-corner-all"> | |
<p> | |
<span class="ui-icon ui-icon-info"></span> | |
<span class="info-msg-text"></span> | |
</p> | |
</div> | |
</div> | |
<form id="create-group-form" accept-charset="UTF-8" | |
action="<%=request.contextPath%><%=resource.path%>.create.html" | |
method="post"> | |
<fieldset> | |
<input type="hidden" value="UTF-8" name="_charset_" /> | |
<div class="prop-line ui-helper-clearfix"> | |
<label for="groupId" accesskey="n"><%=rb.getString("prop.label.groupid")%>:</label> | |
<input id="groupId" type="text" name=":name" /> | |
</div> | |
<div class="prop-line ui-helper-clearfix"> | |
<label for="displayName" accesskey="n"><%=rb.getString("prop.label.displayName")%>:</label> | |
<input id="displayName" type="text" name="displayName" /> | |
</div> | |
<div class="ui-helper-clearfix"> | |
<label> </label> | |
<button accesskey="r" id="createGroupBtn" type="submit"><%=rb.getString("button.create")%></button> | |
</div> | |
</fieldset> | |
</form> | |
</div> | |
<% } /*endif (canAddGroup) */ %> |