Skip to content

Commit

Permalink
1.22 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kalcaddle committed Aug 7, 2021
1 parent 80ef10c commit af8f20e
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/autoload.php

Large diffs are not rendered by default.

31 changes: 26 additions & 5 deletions app/controller/explorer/index.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,46 @@ public function setAuth(){
));

$result = false;
$info = IO::infoSimple($data['path']);
if( $info && $info['sourceID'] &&
$info['targetType'] == SourceModel::TYPE_GROUP){//只能设置部门文档;
$info = IO::info($data['path']);
if( $info && $info['sourceID'] && $info['targetType'] == 'group'){//只能设置部门文档;
if($data['action'] == 'getData'){
$result = Model('SourceAuth')->getAuth($info['sourceID']);
show_json($result);
}

//清空所有子文件(夹)的权限;
if($data['action'] == 'clearChildren'){
$result = Model('SourceAuth')->authClear($info['sourceID']);
}else{
$result = Model('SourceAuth')->setAuth($info['sourceID'],$data['auth']);
$setAuth = $this->setAuthSelf($info,$data['auth']);
$result = Model('SourceAuth')->setAuth($info['sourceID'],$setAuth);
}
}
$msg = !!$result ? LNG('explorer.success') : LNG('explorer.error');
show_json($msg,!!$result);
}

// 设置权限.默认设置自己为之前管理权限; 如果只有自己则清空;
private function setAuthSelf($pathInfo,$auth){
if(!$auth) return $auth;
$selfAuth = _get($pathInfo,'auth.authInfo.id','1');
$authList = array();
foreach($auth as $item){
if( $item['targetID'] == USER_ID &&
$item['targetType'] == SourceModel::TYPE_USER){
continue;
}
$authList[] = $item;
}
if(!$authList) return $authList;
$authList[] = array(
'targetID' => USER_ID,
'targetType'=> SourceModel::TYPE_USER,
'authID' => $selfAuth
);
return $authList;
}

public function pathAllowCheck($path){
$notAllow = array('/', '\\', ':', '*', '?', '"', '<', '>', '|');
$parse = KodIO::parse($path);
Expand Down
2 changes: 1 addition & 1 deletion plugins/webdav/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id":"webdav",
"name":"{{LNG['webdav.meta.name']}}",
"title":"{{LNG['webdav.meta.title']}}",
"version":"1.25",
"version":"1.26",
"source":{
"className":" font-icon ri-hard-drive-fill-2 bg-yellow-6",
"icon":""
Expand Down
1 change: 0 additions & 1 deletion plugins/webdav/static/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ ClassBase.define({
"1":{ //按钮名称
"display":LNG['webdav.user.morePath']+" <b class='caret'></b>",
"className":"btn-default btn-sm",
"attr":{"style":"margin-left:20%;"}
}
},
"switchItem":{"1":"pathAllowMore"}
Expand Down
4 changes: 2 additions & 2 deletions static/app/dist/api.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/app/dist/lib.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/app/dist/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/app/dist/sdk.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/app/dist/vendor.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/style/dist/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/style/dist/sdk.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/style/lib/main.css

Large diffs are not rendered by default.

0 comments on commit af8f20e

Please sign in to comment.