1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

Merge pull request #3589 from haiwen/repair-access-log-bug-2

Repair access log bug 2
This commit is contained in:
Daniel Pan
2019-05-30 16:48:55 +08:00
committed by GitHub
5 changed files with 10 additions and 8 deletions

View File

@@ -153,7 +153,7 @@ class DirentGridView extends React.Component{
this.onCreateFileToggle(currentObject);
break;
case 'Access Log':
this.onAccessLog();
this.onAccessLog(currentObject);
break;
case 'Open via Client':
this.onOpenViaClient(currentObject);
@@ -245,8 +245,10 @@ class DirentGridView extends React.Component{
location.href = url;
}
onAccessLog = () => {
onAccessLog = (currentObject) => {
let filePath = this.getDirentPath(currentObject);
let path = siteRoot + 'repo/file-access/' + this.props.repoID + '/?p=' + encodeURIComponent(filePath) ;
window.open(path);
}
onOpenViaClient = (currentObject) => {
@@ -449,7 +451,7 @@ class DirentGridView extends React.Component{
menuList.push(COMMENT);
}
menuList.push(HISTORY);
if (fileAuditEnabled) {
if (isPro && fileAuditEnabled) {
menuList.push(ACCESS_LOG);
}
menuList.push('Divider');

View File

@@ -506,7 +506,7 @@ class DirentListView extends React.Component {
menuList.push(COMMENT);
}
menuList.push(HISTORY);
if (fileAuditEnabled) {
if (isPro && fileAuditEnabled) {
menuList.push(ACCESS_LOG);
}
menuList.push('Divider');

View File

@@ -109,7 +109,7 @@ class MutipleDirOperationToolbar extends React.Component {
return menu !== RELATED_FILES;
});
}
if (!fileAuditEnabled) {
if (!isPro || !fileAuditEnabled) {
menuList = menuList.filter(menu => {
return menu !== ACCESS_LOG;
});