1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 18:29:23 +00:00

remove ENABLE_FOLDER_PERM

This commit is contained in:
lian
2021-11-25 15:20:32 +08:00
parent 4a48ea3800
commit 127349b214
3 changed files with 3 additions and 15 deletions

View File

@@ -732,11 +732,6 @@ ENABLE_USER_SET_CONTACT_EMAIL = False
ENABLE_GLOBAL_ADDRESSBOOK = True
ENABLE_ADDRESSBOOK_OPT_IN = False
#####################
# Folder Permission #
#####################
ENABLE_FOLDER_PERM = False
####################
# Guest Invite #
####################

View File

@@ -18,8 +18,7 @@ from seahub.base.models import RepoSecretKey
from seahub.base.templatetags.seahub_tags import email2nickname
from seahub.share.models import CustomSharePermissions
from seahub.settings import ENABLE_STORAGE_CLASSES, \
STORAGE_CLASS_MAPPING_POLICY, ENABLE_FOLDER_PERM
from seahub.settings import ENABLE_STORAGE_CLASSES, STORAGE_CLASS_MAPPING_POLICY
logger = logging.getLogger(__name__)
@@ -318,12 +317,9 @@ def is_valid_repo_id_format(repo_id):
def can_set_folder_perm_by_user(username, repo, repo_owner):
""" user can get/update/add/delete folder perm feature must comply with the following
setting: ENABLE_FOLDER_PERM
repo:repo is not virtual
permission: is admin or repo owner.
"""
if not ENABLE_FOLDER_PERM:
return False
if repo.is_virtual:
return False
is_admin = is_repo_admin(username, repo.id)

View File

@@ -49,8 +49,7 @@ from seahub.utils.file_op import check_file_lock
from seahub.utils.timeutils import utc_to_local
from seahub.utils.auth import get_login_bg_image_path
import seahub.settings as settings
from seahub.settings import AVATAR_FILE_STORAGE, \
ENABLE_FOLDER_PERM, ENABLE_REPO_SNAPSHOT_LABEL, \
from seahub.settings import AVATAR_FILE_STORAGE, ENABLE_REPO_SNAPSHOT_LABEL, \
UNREAD_NOTIFICATIONS_REQUEST_INTERVAL, SHARE_LINK_EXPIRE_DAYS_MIN, \
SHARE_LINK_EXPIRE_DAYS_MAX, SHARE_LINK_EXPIRE_DAYS_DEFAULT, \
UPLOAD_LINK_EXPIRE_DAYS_MIN, UPLOAD_LINK_EXPIRE_DAYS_MAX, UPLOAD_LINK_EXPIRE_DAYS_DEFAULT, \
@@ -1163,8 +1162,6 @@ def react_fake_view(request, **kwargs):
logger.error(e)
expire_days = -1
folder_perm_enabled = True if is_pro_version() and ENABLE_FOLDER_PERM else False
try:
max_upload_file_size = seafile_api.get_server_config_int('fileserver', 'max_upload_size')
except Exception as e:
@@ -1195,7 +1192,7 @@ def react_fake_view(request, **kwargs):
'enableFileComment': settings.ENABLE_FILE_COMMENT,
'is_email_configured': IS_EMAIL_CONFIGURED,
'can_add_public_repo': request.user.permissions.can_add_public_repo(),
'folder_perm_enabled': folder_perm_enabled,
'folder_perm_enabled': is_pro_version(),
'file_audit_enabled': FILE_AUDIT_ENABLED,
'custom_nav_items': json.dumps(CUSTOM_NAV_ITEMS),
'enable_show_contact_email_when_search_user': settings.ENABLE_SHOW_CONTACT_EMAIL_WHEN_SEARCH_USER,