<commit_before><div class="artifact-view">
	
	<div class="view-title-container">
		<h1>{{ project.name }}&nbsp; &rsaquo; &nbsp;{{artifact.name}}</h1>
	</div>
	
	<div class="view-body-container">
		<div class="text-right hidden">
			<a class="btn btn-link btn-xs" ui-sref="p.detail">Cancel</a>
			<a class="btn btn-link btn-xs" ui-sref="p.artifact.edit({artifactId:artifact._id})">Edit</a>
		</div>
		<!-- <div ng-include="'modules/artifacts/client/views/partial.artifact-view.html'"></div> -->
		<tmpl-artifact-display x-mode="'view'" x-artifact="artifact" x-project="project"></tmpl-artifact-display>
		<div ng-if="authentication.user" ng-include="'modules/artifacts/client/views/partial.artifact-notes.html'"></div>
		<div ng-if="authentication.user" ng-include="'modules/artifacts/client/views/partial.artifact-comments.html'"></div>
		<div class="form-footer clearfix">
			<div class="pull-right">
				<a class="btn btn-default" ui-sref="p.detail">Cancel</a>
				<a ng-if="mc.renderWidget(artifact.typeCode, project)"
				   class="btn btn-default"
				   ui-sref="p.artifact.edit({artifactId:artifact._id})">Edit</a>
			</div>
		</div>
	</div>

</div><commit_msg>Switch to adding based on userPermissions<commit_after><div class="artifact-view">
	
	<div class="view-title-container">
		<h1>{{ project.name }}&nbsp; &rsaquo; &nbsp;{{artifact.name}}</h1>
	</div>
	
	<div class="view-body-container">
		<div class="text-right hidden">
			<a class="btn btn-link btn-xs" ui-sref="p.detail">Cancel</a>
			<a class="btn btn-link btn-xs" ui-sref="p.artifact.edit({artifactId:artifact._id})">Edit</a>
		</div>
		<!-- <div ng-include="'modules/artifacts/client/views/partial.artifact-view.html'"></div> -->
		<tmpl-artifact-display x-mode="'view'" x-artifact="artifact" x-project="project"></tmpl-artifact-display>
		<div ng-if="authentication.user" ng-include="'modules/artifacts/client/views/partial.artifact-notes.html'"></div>
		<div ng-if="authentication.user" ng-include="'modules/artifacts/client/views/partial.artifact-comments.html'"></div>
		<div class="form-footer clearfix">
			<div class="pull-right">
				<a class="btn btn-default" ui-sref="p.detail">Cancel</a>
				<!-- <a ng-if="mc.renderWidget(artifact.typeCode, project)" -->
				<a ng-if="artifact.userPermissions.write"
				   class="btn btn-default"
				   ui-sref="p.artifact.edit({artifactId:artifact._id})">Edit</a>
			</div>
		</div>
	</div>

</div>
{'fraction_non_alphanumeric': 0.21661843737081438, 'fraction_numerical': 0.0016535758577924762, 'mean_word_length': 4.641025641025641, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4816965', 'n_tokens_mistral': 965, 'n_tokens_neox': 842, 'n_words': 120}