* Finish task #89141.

This commit is contained in:
liumengyi
2023-03-27 16:51:18 +08:00
parent f818d387f2
commit 3771b0d154
4 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ class doc extends control
if($execution->type == 'stage') $this->lang->doc->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->execution);
}
if($type == 'custom') unset($this->lang->doclib->aclList['defalut']);
if($type == 'custom') unset($this->lang->doclib->aclList['default']);
if($type != 'custom')
{
$this->lang->doclib->aclList['default'] = sprintf($this->lang->doclib->aclList['default'], $this->lang->{$type}->common);
-1
View File
@@ -11,4 +11,3 @@ table {width: 90% !important;}
#groups_chosen.chosen-container .chosen-results, #users_chosen.chosen-container .chosen-results {max-height: 160px;}
.objectBox > td.required:after {right: 277px;}
#aclBox .radio-inline + .radio-inline {margin-top: 5px; margin-left: 0px;}
+1 -3
View File
@@ -1121,18 +1121,16 @@ class docModel extends model
$authorizedUsers = $this->user->getProjectAuthedUsers($project, $stakeHolders, $projectTeams, array_flip(explode(",", $project->whitelist)));
if(strpos(",{$object->users},", $account) !== false) return true;
if(array_key_exists($this->app->user->account, array_filter($authorizedUsers))) return true;
}
if($object->acl == 'custom')
if($object->acl == 'custom' or $object->acl == 'private' or $object->acl == 'default')
{
$userGroups = $this->app->user->groups;
foreach($userGroups as $groupID)
{
if(strpos(",$object->groups,", ",$groupID,") !== false) return true;
}
if(strpos(",{$object->users},", $account) !== false) return true;
}
if(strpos($extra, 'notdoc') !== false)
+1 -1
View File
@@ -45,7 +45,7 @@
<tr id="aclBox">
<th><?php echo $lang->doclib->control;?></th>
<td>
<?php echo html::radio('acl', $lang->doclib->aclList, $type == 'custom' ? 'open' : 'default', "onchange='toggleAcl(this.value, \"lib\")'")?>
<?php echo html::radio('acl', $lang->doclib->aclList, $type == 'custom' ? 'open' : 'default', "onchange='toggleAcl(this.value, \"lib\")'", 'block')?>
</td>
</tr>
<tr id='whiteListBox' class="<?php if($type == 'custom') echo 'hidden';?>">