mirror of
https://git.victorphan.net/basketballcantho/Teedy_custom.git
synced 2026-08-05 22:03:11 +07:00
Closes #509: guest users cannot share and unshare
This commit is contained in:
@@ -55,7 +55,7 @@ public class ShareResource extends BaseResource {
|
||||
public Response add(
|
||||
@FormParam("id") String documentId,
|
||||
@FormParam("name") String name) {
|
||||
if (!authenticate()) {
|
||||
if (!authenticate() || principal.isGuest()) {
|
||||
throw new ForbiddenClientException();
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class ShareResource extends BaseResource {
|
||||
@Path("{id: [a-z0-9\\-]+}")
|
||||
public Response delete(
|
||||
@PathParam("id") String id) {
|
||||
if (!authenticate()) {
|
||||
if (!authenticate() || principal.isGuest()) {
|
||||
throw new ForbiddenClientException();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user