<commit_before><%@ include file="/WEB-INF/pages/common/taglibs.jsp"%>

<html>
<head>
    <title>Experiment Permissions</title>
    <style>
        table.searchresults table.form td {
          border: none;
        }
    </style>
</head>

<body>
    <h1>Experiment Permissions</h1>
    <caarray:helpPrint/>
    <script type="text/javascript">

    var SecurityLevel = new Object();
    SecurityLevel.sampleSecurityLevels = new Object();
    <s:iterator value="@gov.nih.nci.caarray.domain.permissions.SecurityLevel@values()" id="secLevel">
    SecurityLevel.sampleSecurityLevels['<s:property value="#secLevel.name()"/>'] = new Array();
        <s:iterator value="#secLevel.sampleSecurityLevels" id="sampleSecLevel">
    SecurityLevel.sampleSecurityLevels['<s:property value="#secLevel.name()"/>'].push({ value: '<s:property value="#sampleSecLevel.name()"/>', label: '<s:property value="getText(#sampleSecLevel.resourceKey)"/>' });
        </s:iterator>
    </s:iterator>
    </script>

    <div class="padme">
        <c:url var="detailsUrl" value="/project/details.action">
            <c:param name="project.id" value="${project.id}" />
        </c:url>
        <h2><span class="dark">Experiment:</span> ${project.experiment.title} (<a href="${detailsUrl}">Details</a>)</h2>

        <div id="tabboxwrapper_notabs" style="height:650px;">
            <div class="boxpad">
                <p class="instructions">
                    Assigning an Access Profile to this experiment allows you to control who gets access.
                    Assign specific access rules down to the sample level in the box on the right.
                </p>

                <caarray:successMessages />
                <div class="message" id="ajax_success_messages" style="display: none">
                </div>

                <div style="padding-bottom: 20px; min-height: 500px; margin-top: 10px">
                    <div class="leftsidetable" style="width: 350px; float: left">
                        <table class="searchresults permissiontable" cellspacing="0">
                            <tr>
                                <th>Who May Access this Experiment</th>
                            </tr>
                        </table>
                        <div class="datatable" id="access_profile_owners" style="padding-bottom: 0px">
                            <div class="scrolltable" style="height: auto">
                            <table class="searchresults permissiontable" cellspacing="0">
                                <tr>
                                    <td>
                                        <div class="bigbold">The Public</div>
                                        <c:url var="loadPublicProfileUrl" value="/protected/ajax/project/permissions/loadPublicProfile.action">
                                            <c:param name="project.id" value="${project.id}"/>
                                        </c:url>
                                        <caarray:linkButton actionClass="edit" text="Edit Access Control" style="margin-left: 0px" onclick="PermissionUtils.loadProfile('${loadPublicProfileUrl}');"/>
                                        <p class="nopad" style="clear: both"><br>Edit access to the experiment by anonymous users</p>
                                        <p>
                                        The following access profiles can be managed to grant visibility into the summary
                                        and/or contents of an experiment prior to its publication. The profiles are:
                                        </p>
                                        <ul id="profile_legend">
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.<EMAIL>.nci.caarray.domain.permissions.SecurityLevel@VISIBLE.resourceKey"/></fmt:message></span>
                                                - applied by default to each experiment upon creation, this profile exposes summary information without access to annotation and array data.
                                             </li>
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.<EMAIL>.nci.caarray.domain.permissions.SecurityLevel@READ.resourceKey"/></fmt:message></span>
                                                - grants read access to the experiment as a whole - providing a preview into its content
                                            </li>
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.<EMAIL>.nci.caarray.domain.permissions.SecurityLevel@READ_SELECTIVE.resourceKey"/></fmt:message></span>
                                                - grants selective access to specific sample annotation and data
                                            </li>
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.nih.nci.caarray.domain.permissions.SecurityLevel@NO_VISIBILITY.resourceKey"/></fmt:message></span>
                                                - completely removes the experiment summary information from view
                                            </li>
                                        </ul>
                                        <br/>
                                        <s:form action="project/permissions/setTcgaPolicy" cssClass="form" theme="simple" id="policy_form">
                                            <s:hidden name="project.id"/>
                                            <s:checkbox name="useTcgaPolicy" value="%{project.useTcgaPolicy}" cssStyle="border: none"/>
                                            <s:label for="policy_form_useTcgaPolicy" value="Use TCGA Policy (applies only to Human SNP data)"/>
                                            <input type="submit" class="enableEnterSubmit"/>
                                        </s:form>
                                        <caarray:linkButton actionClass="save" text="Save" style="margin-left: 0px" onclick="$('policy_form').submit(); return false;"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="bigbold">Collaboration Groups</div>
                                        <c:choose>
                                            <c:when test="${!empty collaboratorGroups}">
                                                <p class="nopad">Edit access to the experiment by members of selected group</p>
                                                <s:form action="ajax/project/permissions/loadGroupProfile" cssClass="form" theme="simple" id="collaborators_form" onsubmit="PermissionUtils.loadProfileFromForm('collaborators_form'); return false;">
                                                    <s:hidden name="project.id"/>
                                                    <s:label for="collaborators_form_collaboratorGroup_id" value="Collaboration Group"/>
                                                    <s:select required="true" name="collaboratorGroup.id" tabindex="1" label="Collaboration Group"
                                                              list="collaboratorGroups" listKey="id" listValue="group.groupName"/>
                                                    <caarray:linkButton actionClass="edit" text="Edit Access Control" style="margin-left: 0px" onclick="PermissionUtils.loadProfileFromForm('collaborators_form');"/>
                                                    <input type="submit" class="enableEnterSubmit"/>
                                                </s:form>
                                            </c:when>
                                            <c:otherwise>
                                                There are no collaboration groups defined.
                                            </c:otherwise>
                                        </c:choose>
                                        <caarray:linkButton actionClass="add" text="Add New Group" style="margin-left: 0px">
                                            <jsp:attribute name="url"><c:url value="/protected/collaborators/edit.action"/></jsp:attribute>
                                        </caarray:linkButton>
                                    </td>
                                </tr>
                            </table>
                            </div>
                        </div>
                    </div>

                    <div class="rightsidetable" style="width: 305px; float: left">
                        <div class="datatable">
                            <div id="access_profile_loading" style="display: none">
                                <img alt="Indicator" align="absmiddle" src="<c:url value="/images/indicator.gif"/>" /> Loading access profile
                            </div>
                            <div id="access_profile_saving" style="display: none">
                                <img alt="Indicator" align="absmiddle" src="<c:url value="/images/indicator.gif"/>" /> Saving access profile
                            </div>
                            <div id="access_profile_details">
                                <%@ include file="/WEB-INF/pages/project/permissions/summary.jsp" %>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</body>
</html><commit_msg>fixes bug: [#19728] Experiment Permissions page wrongly describes Visible as being the default state.<commit_after><%@ include file="/WEB-INF/pages/common/taglibs.jsp"%>

<html>
<head>
    <title>Experiment Permissions</title>
    <style>
        table.searchresults table.form td {
          border: none;
        }
    </style>
</head>

<body>
    <h1>Experiment Permissions</h1>
    <caarray:helpPrint/>
    <script type="text/javascript">

    var SecurityLevel = new Object();
    SecurityLevel.sampleSecurityLevels = new Object();
    <s:iterator value="@gov.<EMAIL>.nci.caarray.domain.permissions.SecurityLevel@values()" id="secLevel">
    SecurityLevel.sampleSecurityLevels['<s:property value="#secLevel.name()"/>'] = new Array();
        <s:iterator value="#secLevel.sampleSecurityLevels" id="sampleSecLevel">
    SecurityLevel.sampleSecurityLevels['<s:property value="#secLevel.name()"/>'].push({ value: '<s:property value="#sampleSecLevel.name()"/>', label: '<s:property value="getText(#sampleSecLevel.resourceKey)"/>' });
        </s:iterator>
    </s:iterator>
    </script>

    <div class="padme">
        <c:url var="detailsUrl" value="/project/details.action">
            <c:param name="project.id" value="${project.id}" />
        </c:url>
        <h2><span class="dark">Experiment:</span> ${project.experiment.title} (<a href="${detailsUrl}">Details</a>)</h2>

        <div id="tabboxwrapper_notabs" style="height:650px;">
            <div class="boxpad">
                <p class="instructions">
                    Assigning an Access Profile to this experiment allows you to control who gets access.
                    Assign specific access rules down to the sample level in the box on the right.
                </p>

                <caarray:successMessages />
                <div class="message" id="ajax_success_messages" style="display: none">
                </div>

                <div style="padding-bottom: 20px; min-height: 500px; margin-top: 10px">
                    <div class="leftsidetable" style="width: 350px; float: left">
                        <table class="searchresults permissiontable" cellspacing="0">
                            <tr>
                                <th>Who May Access this Experiment</th>
                            </tr>
                        </table>
                        <div class="datatable" id="access_profile_owners" style="padding-bottom: 0px">
                            <div class="scrolltable" style="height: auto">
                            <table class="searchresults permissiontable" cellspacing="0">
                                <tr>
                                    <td>
                                        <div class="bigbold">The Public</div>
                                        <c:url var="loadPublicProfileUrl" value="/protected/ajax/project/permissions/loadPublicProfile.action">
                                            <c:param name="project.id" value="${project.id}"/>
                                        </c:url>
                                        <caarray:linkButton actionClass="edit" text="Edit Access Control" style="margin-left: 0px" onclick="PermissionUtils.loadProfile('${loadPublicProfileUrl}');"/>
                                        <p class="nopad" style="clear: both"><br>Edit access to the experiment by anonymous users</p>
                                        <p>
                                        The following access profiles can be managed to grant visibility into the summary
                                        and/or contents of an experiment prior to its publication. The profiles are:
                                        </p>
                                        <ul id="profile_legend">
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.nih.nci.caarray.domain.permissions.SecurityLevel@NO_VISIBILITY.resourceKey"/></fmt:message></span>
                                                - Applied by default to each experiment upon creation, this profile completely removes the experiment summary information from view.
                                            </li>
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.nih.nci.caarray.domain.permissions.SecurityLevel@VISIBLE.resourceKey"/></fmt:message></span>
                                                - Exposes experiment summary information without access to annotation and array data.
                                             </li>
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.nih.nci.caarray.domain.permissions.SecurityLevel@READ.resourceKey"/></fmt:message></span>
                                                - Grants read access to the experiment as a whole, providing a preview into its content.
                                            </li>
                                            <li>
                                                <span class="bigbold"><fmt:message><s:property value="@gov.nih.nci.caarray.domain.permissions.SecurityLevel@READ_SELECTIVE.resourceKey"/></fmt:message></span>
                                                - Grants selective access to specific sample annotation and data.
                                            </li>
                                        </ul>
                                        <br/>
                                        <s:form action="project/permissions/setTcgaPolicy" cssClass="form" theme="simple" id="policy_form">
                                            <s:hidden name="project.id"/>
                                            <s:checkbox name="useTcgaPolicy" value="%{project.useTcgaPolicy}" cssStyle="border: none"/>
                                            <s:label for="policy_form_useTcgaPolicy" value="Use TCGA Policy (applies only to Human SNP data)"/>
                                            <input type="submit" class="enableEnterSubmit"/>
                                        </s:form>
                                        <caarray:linkButton actionClass="save" text="Save" style="margin-left: 0px" onclick="$('policy_form').submit(); return false;"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="bigbold">Collaboration Groups</div>
                                        <c:choose>
                                            <c:when test="${!empty collaboratorGroups}">
                                                <p class="nopad">Edit access to the experiment by members of selected group</p>
                                                <s:form action="ajax/project/permissions/loadGroupProfile" cssClass="form" theme="simple" id="collaborators_form" onsubmit="PermissionUtils.loadProfileFromForm('collaborators_form'); return false;">
                                                    <s:hidden name="project.id"/>
                                                    <s:label for="collaborators_form_collaboratorGroup_id" value="Collaboration Group"/>
                                                    <s:select required="true" name="collaboratorGroup.id" tabindex="1" label="Collaboration Group"
                                                              list="collaboratorGroups" listKey="id" listValue="group.groupName"/>
                                                    <caarray:linkButton actionClass="edit" text="Edit Access Control" style="margin-left: 0px" onclick="PermissionUtils.loadProfileFromForm('collaborators_form');"/>
                                                    <input type="submit" class="enableEnterSubmit"/>
                                                </s:form>
                                            </c:when>
                                            <c:otherwise>
                                                There are no collaboration groups defined.
                                            </c:otherwise>
                                        </c:choose>
                                        <caarray:linkButton actionClass="add" text="Add New Group" style="margin-left: 0px">
                                            <jsp:attribute name="url"><c:url value="/protected/collaborators/edit.action"/></jsp:attribute>
                                        </caarray:linkButton>
                                    </td>
                                </tr>
                            </table>
                            </div>
                        </div>
                    </div>

                    <div class="rightsidetable" style="width: 305px; float: left">
                        <div class="datatable">
                            <div id="access_profile_loading" style="display: none">
                                <img alt="Indicator" align="absmiddle" src="<c:url value="/images/indicator.gif"/>" /> Loading access profile
                            </div>
                            <div id="access_profile_saving" style="display: none">
                                <img alt="Indicator" align="absmiddle" src="<c:url value="/images/indicator.gif"/>" /> Saving access profile
                            </div>
                            <div id="access_profile_details">
                                <%@ include file="/WEB-INF/pages/project/permissions/summary.jsp" %>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</body>
</html>
{'fraction_non_alphanumeric': 0.10784068762180801, 'fraction_numerical': 0.0030483234221178354, 'mean_word_length': 1.1712053813605294, 'pattern_counts': {'":': 0, '<': 315, '<?xml version=': 0, '>': 315, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 204, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '143613', 'n_tokens_mistral': 4258, 'n_tokens_neox': 3992, 'n_words': 903}