1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 15:36:37 +00:00

Repo can be set 'read-only' or 'normal' status.

Return 'status' in get_repo(s) apis.
This commit is contained in:
cuihaikuo
2019-03-11 14:35:41 +08:00
parent 78bef71a5f
commit 22f096a70a
12 changed files with 202 additions and 63 deletions

View File

@@ -373,6 +373,12 @@ check_permission (HttpServer *htp_server, const char *repo_id, const char *usern
return EVHTP_RES_OK;
}
if (strcmp(op, "upload") == 0) {
int status = seaf_repo_manager_get_repo_status(seaf->repo_mgr, repo_id);
if (status != REPO_STATUS_NORMAL)
return EVHTP_RES_FORBIDDEN;
}
char *perm = seaf_repo_manager_check_permission (seaf->repo_mgr,
repo_id, username, NULL);
if (perm) {