mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
Merge pull request #3589 from haiwen/repair-access-log-bug-2
Repair access log bug 2
This commit is contained in:
@@ -153,7 +153,7 @@ class DirentGridView extends React.Component{
|
|||||||
this.onCreateFileToggle(currentObject);
|
this.onCreateFileToggle(currentObject);
|
||||||
break;
|
break;
|
||||||
case 'Access Log':
|
case 'Access Log':
|
||||||
this.onAccessLog();
|
this.onAccessLog(currentObject);
|
||||||
break;
|
break;
|
||||||
case 'Open via Client':
|
case 'Open via Client':
|
||||||
this.onOpenViaClient(currentObject);
|
this.onOpenViaClient(currentObject);
|
||||||
@@ -245,8 +245,10 @@ class DirentGridView extends React.Component{
|
|||||||
location.href = url;
|
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) => {
|
onOpenViaClient = (currentObject) => {
|
||||||
@@ -449,7 +451,7 @@ class DirentGridView extends React.Component{
|
|||||||
menuList.push(COMMENT);
|
menuList.push(COMMENT);
|
||||||
}
|
}
|
||||||
menuList.push(HISTORY);
|
menuList.push(HISTORY);
|
||||||
if (fileAuditEnabled) {
|
if (isPro && fileAuditEnabled) {
|
||||||
menuList.push(ACCESS_LOG);
|
menuList.push(ACCESS_LOG);
|
||||||
}
|
}
|
||||||
menuList.push('Divider');
|
menuList.push('Divider');
|
||||||
|
@@ -506,7 +506,7 @@ class DirentListView extends React.Component {
|
|||||||
menuList.push(COMMENT);
|
menuList.push(COMMENT);
|
||||||
}
|
}
|
||||||
menuList.push(HISTORY);
|
menuList.push(HISTORY);
|
||||||
if (fileAuditEnabled) {
|
if (isPro && fileAuditEnabled) {
|
||||||
menuList.push(ACCESS_LOG);
|
menuList.push(ACCESS_LOG);
|
||||||
}
|
}
|
||||||
menuList.push('Divider');
|
menuList.push('Divider');
|
||||||
|
@@ -109,7 +109,7 @@ class MutipleDirOperationToolbar extends React.Component {
|
|||||||
return menu !== RELATED_FILES;
|
return menu !== RELATED_FILES;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!fileAuditEnabled) {
|
if (!isPro || !fileAuditEnabled) {
|
||||||
menuList = menuList.filter(menu => {
|
menuList = menuList.filter(menu => {
|
||||||
return menu !== ACCESS_LOG;
|
return menu !== ACCESS_LOG;
|
||||||
});
|
});
|
||||||
|
@@ -26,7 +26,7 @@ export const canAddRepo = window.app.pageOptions.canAddRepo;
|
|||||||
export const canGenerateShareLink = window.app.pageOptions.canGenerateShareLink;
|
export const canGenerateShareLink = window.app.pageOptions.canGenerateShareLink;
|
||||||
export const canGenerateUploadLink = window.app.pageOptions.canGenerateUploadLink ? true : false;
|
export const canGenerateUploadLink = window.app.pageOptions.canGenerateUploadLink ? true : false;
|
||||||
export const canViewOrg = window.app.pageOptions.canViewOrg === 'True';
|
export const canViewOrg = window.app.pageOptions.canViewOrg === 'True';
|
||||||
export const fileAuditEnabled = window.app.pageOptions.fileAuditEnabled ? true : false;
|
export const fileAuditEnabled = window.app.pageOptions.fileAuditEnabled;
|
||||||
export const enableFileComment = window.app.pageOptions.enableFileComment ? true : false;
|
export const enableFileComment = window.app.pageOptions.enableFileComment ? true : false;
|
||||||
export const folderPermEnabled = window.app.pageOptions.folderPermEnabled;
|
export const folderPermEnabled = window.app.pageOptions.folderPermEnabled;
|
||||||
export const enableResetEncryptedRepoPassword = window.app.pageOptions.enableResetEncryptedRepoPassword === 'True';
|
export const enableResetEncryptedRepoPassword = window.app.pageOptions.enableResetEncryptedRepoPassword === 'True';
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
canGenerateShareLink: {% if user.permissions.can_generate_share_link %} true {% else %} false {% endif %},
|
canGenerateShareLink: {% if user.permissions.can_generate_share_link %} true {% else %} false {% endif %},
|
||||||
canGenerateUploadLink: {% if user.permissions.can_generate_upload_link %} true {% else %} false {% endif %},
|
canGenerateUploadLink: {% if user.permissions.can_generate_upload_link %} true {% else %} false {% endif %},
|
||||||
canViewOrg:'{{ user.permissions.can_view_org }}',
|
canViewOrg:'{{ user.permissions.can_view_org }}',
|
||||||
fileAuditEnabled: '{{ file_audit_enabled }}',
|
fileAuditEnabled: {% if file_audit_enabled %} true {% else %} false {% endif %},
|
||||||
enableFileComment: {% if enableFileComment %} true {% else %} false {% endif %},
|
enableFileComment: {% if enableFileComment %} true {% else %} false {% endif %},
|
||||||
folderPermEnabled: {% if folder_perm_enabled %} true {% else %} false {% endif %},
|
folderPermEnabled: {% if folder_perm_enabled %} true {% else %} false {% endif %},
|
||||||
enableResetEncryptedRepoPassword: '{{ enable_reset_encrypted_repo_password }}',
|
enableResetEncryptedRepoPassword: '{{ enable_reset_encrypted_repo_password }}',
|
||||||
|
Reference in New Issue
Block a user