<commit_before>{% extends "base.html" %}

{% block title %}Modify Subuser{% endblock %}

{% block content %}
<div class="col-md-9">
	{% if flash.info is defined %}
		{{ flash.info.0|raw }}
	{% endif %}
	<form action="/node/users/edit" method="post">
		<h3 class="nopad">Viewing Perissions for: {{ user.email }}</h3><hr />
		<div class="list-group">
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="console.view" checked="checked" disabled/> View Console</label>
				<p class="list-group-item-text">Gives user permission to view the console page. This must be enabled in order to add a subuser to the server. They will be able to view the server statistics as well as the server console.</p>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="console.commands" {% if permissions.console_commands is defined %}checked="checked"{% endif %}/> Send Commands</label>
						<p class="list-group-item-text">Gives user permission to send commands to the server from the page.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="console.power" {% if permissions.console_power is defined %}checked="checked"{% endif %}/> Control Power</label>
						<p class="list-group-item-text">Gives user permission to start, stop, or restart the server.</p>
					</div>
				</div>
			</a>
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="files.view" {% if permissions.files_view is defined %}checked="checked"{% endif %}/> View Files</label>
				<p class="list-group-item-text">Gives user permission to view the file listing.</p>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.edit" {% if permissions.files_edit is defined %}checked="checked"{% endif %}/> Edit File</label>
						<p class="list-group-item-text">Gives user permission to open a file for editing.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.save" {% if permissions.files_save is defined %}checked="checked"{% endif %}/> Save Modifications</label>
						<p class="list-group-item-text">Gives user permission to save a modified version of a file.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.download" {% if permissions.files_download is defined %}checked="checked"{% endif %}/> Download Files</label>
						<p class="list-group-item-text">Gives user permission to download files from the server.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.zip" {% if permissions.files_zip is defined %}checked="checked"{% endif %}/> Compress and Decompress Files</label>
						<p class="list-group-item-text">Gives user permission to unzip or untar files on the server as well as compress existing folders.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.create" {% if permissions.files_create is defined %}checked="checked"{% endif %}/> Create Files</label>
						<p class="list-group-item-text">Gives user permission to create files on the server.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.upload" {% if permissions.files_upload is defined %}checked="checked"{% endif %}/> Upload Files</label>
						<p class="list-group-item-text">Gives user permission to upload files to the server.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.delete" {% if permissions.files_delete is defined %}checked="checked"{% endif %}/> Delete Files <span class="label label-danger">Danger</span></label>
						<p class="list-group-item-text">Gives user permission to delete files on the server.</p>
					</div>
				</div>
			</a>
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="manage.oauth2" {% if permissions.manage_oauth2 is defined %}checked="checked"{% endif %}/> OAuth2 Access</label>
				<p class="list-group-item-text">Gives user permission to create their own API credentials</p>
			</a>
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="sftp" {% if permissions.sftp is defined %}checked="checked"{% endif %}/> View Manager</label>
				<p class="list-group-item-text">Gives user permission to access the server using SFTP</p>
			</a>
		</div>
		<div class="form-group">
			<div>
				{{ xsrf|raw }}
				<input type="hidden" name="user_id" value="{{ user.user_id }}" />
				<input type="submit" value="Update Permissions" class="btn btn-primary btn-sm" />
				<a href="/node/users/revoke/{{ user.email }}"><button class="btn btn-sm btn-danger" type="button"/>Delete User</button></a>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
	$("#sidebar_links").find("a[href='/node/users']").addClass('active');
});
</script>
{% endblock %}<commit_msg>Fix typo on edit screen<commit_after>{% extends "base.html" %}

{% block title %}Modify Subuser{% endblock %}

{% block content %}
<div class="col-md-9">
	{% if flash.info is defined %}
		{{ flash.info.0|raw }}
	{% endif %}
	<form action="/node/users/edit" method="post">
		<h3 class="nopad">Viewing Perissions for: {{ user.email }}</h3><hr />
		<div class="list-group">
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="console.view" checked="checked" disabled/> View Console</label>
				<p class="list-group-item-text">Gives user permission to view the console page. This must be enabled in order to add a subuser to the server. They will be able to view the server statistics as well as the server console.</p>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="console.commands" {% if permissions.console_commands is defined %}checked="checked"{% endif %}/> Send Commands</label>
						<p class="list-group-item-text">Gives user permission to send commands to the server from the page.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="console.power" {% if permissions.console_power is defined %}checked="checked"{% endif %}/> Control Power</label>
						<p class="list-group-item-text">Gives user permission to start, stop, or restart the server.</p>
					</div>
				</div>
			</a>
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="files.view" {% if permissions.files_view is defined %}checked="checked"{% endif %}/> View Files</label>
				<p class="list-group-item-text">Gives user permission to view the file listing.</p>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.edit" {% if permissions.files_edit is defined %}checked="checked"{% endif %}/> Edit File</label>
						<p class="list-group-item-text">Gives user permission to open a file for editing.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.save" {% if permissions.files_save is defined %}checked="checked"{% endif %}/> Save Modifications</label>
						<p class="list-group-item-text">Gives user permission to save a modified version of a file.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.download" {% if permissions.files_download is defined %}checked="checked"{% endif %}/> Download Files</label>
						<p class="list-group-item-text">Gives user permission to download files from the server.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.zip" {% if permissions.files_zip is defined %}checked="checked"{% endif %}/> Compress and Decompress Files</label>
						<p class="list-group-item-text">Gives user permission to unzip or untar files on the server as well as compress existing folders.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.create" {% if permissions.files_create is defined %}checked="checked"{% endif %}/> Create Files</label>
						<p class="list-group-item-text">Gives user permission to create files on the server.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.upload" {% if permissions.files_upload is defined %}checked="checked"{% endif %}/> Upload Files</label>
						<p class="list-group-item-text">Gives user permission to upload files to the server.</p>
					</div>
				</div>
				<div class="row" style="margin-top:10px;">
					<div class="col-md-1 col-xs-1"><br /><br /></div>
					<div class="col-md-11 col-xs-11">
						<label><input type="checkbox" name="permissions[]" value="files.delete" {% if permissions.files_delete is defined %}checked="checked"{% endif %}/> Delete Files <span class="label label-danger">Danger</span></label>
						<p class="list-group-item-text">Gives user permission to delete files on the server.</p>
					</div>
				</div>
			</a>
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="manage.oauth2" {% if permissions.manage_oauth2 is defined %}checked="checked"{% endif %}/> OAuth2 Access</label>
				<p class="list-group-item-text">Gives user permission to create their own API credentials</p>
			</a>
			<a href="#" class="list-group-item">
				<label><input type="checkbox" name="permissions[]" value="sftp" {% if permissions.sftp is defined %}checked="checked"{% endif %}/> SFTP</label>
				<p class="list-group-item-text">Gives user permission to access the server using SFTP</p>
			</a>
		</div>
		<div class="form-group">
			<div>
				{{ xsrf|raw }}
				<input type="hidden" name="user_id" value="{{ user.user_id }}" />
				<input type="submit" value="Update Permissions" class="btn btn-primary btn-sm" />
				<a href="/node/users/revoke/{{ user.email }}"><button class="btn btn-sm btn-danger" type="button"/>Delete User</button></a>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
	$("#sidebar_links").find("a[href='/node/users']").addClass('active');
});
</script>
{% endblock %}
{'fraction_non_alphanumeric': 0.19792828685258965, 'fraction_numerical': 0.012589641434262949, 'mean_word_length': 3.902734375, 'pattern_counts': {'":': 0, '<': 339, '<?xml version=': 0, '>': 339, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1184235', 'n_tokens_mistral': 4896, 'n_tokens_neox': 4000, 'n_words': 1053}