add: circle stacks
This commit is contained in:
parent
50704d27a9
commit
56cea83933
27 changed files with 419 additions and 107 deletions
|
@ -25,7 +25,7 @@ pub async fn list_request(jar: CookieJar, Extension(data): Extension<State>) ->
|
|||
}
|
||||
};
|
||||
|
||||
let list = match data.0.get_stacks_by_owner(user.id).await {
|
||||
let list = match data.0.get_stacks_by_user(user.id).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &Some(user)).await)),
|
||||
};
|
||||
|
@ -63,6 +63,7 @@ pub async fn feed_request(
|
|||
|
||||
if stack.privacy == StackPrivacy::Private
|
||||
&& user.id != stack.owner
|
||||
&& !(stack.mode == StackMode::Circle && stack.users.contains(&user.id))
|
||||
&& !user.permissions.check(FinePermission::MANAGE_STACKS)
|
||||
{
|
||||
return Err(Html(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue