1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-08-31 23:19:36 +00:00

Add rpc repo_has_been_shared().

This commit is contained in:
cuihaikuo
2018-05-02 11:05:43 +08:00
parent cc00c76477
commit 330fc7597e
7 changed files with 58 additions and 0 deletions

View File

@@ -5243,4 +5243,17 @@ seafile_get_org_group_repos_by_user (const char *user, int org_id, GError **erro
return seaf_get_group_repos_by_user (mgr, user, org_id, error);
}
int
seafile_repo_has_been_shared (const char *repo_id, int including_groups, GError **error)
{
if (!repo_id) {
g_set_error (error, 0, SEAF_ERR_BAD_ARGS, "Arguments error");
return FALSE;
}
gboolean exists = seaf_share_manager_repo_has_been_shared (seaf->share_mgr, repo_id,
including_groups ? TRUE : FALSE);
return exists ? 1 : 0;
}
#endif /* SEAFILE_SERVER */