Disable users on items for now
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing

This commit is contained in:
Kasper Juul Hermansen 2021-11-18 23:06:34 +01:00
parent 7712f63999
commit 5353941140
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
3 changed files with 6 additions and 2 deletions

View File

@ -24,8 +24,8 @@ public record GetTodoByIdQuery([Required] string TodoId) : IRequest<TodoViewMode
var userId = _currentUserService.GetUserId();
var todo = await _todoRepository.GetTodoByIdAsync(request.TodoId);
if (todo.AuthorId != userId)
throw new InvalidOperationException("User is not allowed to access todo");
//if (todo.AuthorId != userId)
// throw new InvalidOperationException("User is not allowed to access todo");
return TodoViewModel.From(todo);
}

View File

@ -40,6 +40,9 @@ export const TodoItem: FC<TodoItemProps> = (props) => {
{props.todo.description && (
<div className="h-3 w-3 bg-gray-100 dark:border-black border border-gray-300 dark:bg-gray-900 rounded-sm" />
)}
{!props.todo.authorId && (
<div className="h-3 w-3 bg-red-500 rounded-sm" />
)}
</div>
{props.displayProject && props.todo.project && (
<div className="text-gray-500 text-xs text-right whitespace-nowrap place-self-end">

View File

@ -12,6 +12,7 @@ export interface Todo {
description?: string;
status: StatusState;
project?: string;
authorId?: string;
}
export const asTodo = (item: Todo): Todo => {