Disable users on items for now #2
17
.drone.yml
17
.drone.yml
@ -1,17 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
name: default
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: apply ansible production
|
|
||||||
image: plugins/ansible:latest
|
|
||||||
settings:
|
|
||||||
playbook: deployment/todo-setup.yml
|
|
||||||
inventory: deployment/prod/hosts
|
|
||||||
galaxy: deployment/requirements.yml
|
|
||||||
private_key:
|
|
||||||
from_secret: ansible_private_key
|
|
||||||
verbose: 3
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
@ -24,8 +24,8 @@ public record GetTodoByIdQuery([Required] string TodoId) : IRequest<TodoViewMode
|
|||||||
var userId = _currentUserService.GetUserId();
|
var userId = _currentUserService.GetUserId();
|
||||||
var todo = await _todoRepository.GetTodoByIdAsync(request.TodoId);
|
var todo = await _todoRepository.GetTodoByIdAsync(request.TodoId);
|
||||||
|
|
||||||
if (todo.AuthorId != userId)
|
//if (todo.AuthorId != userId)
|
||||||
throw new InvalidOperationException("User is not allowed to access todo");
|
// throw new InvalidOperationException("User is not allowed to access todo");
|
||||||
|
|
||||||
return TodoViewModel.From(todo);
|
return TodoViewModel.From(todo);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,9 @@ export const TodoItem: FC<TodoItemProps> = (props) => {
|
|||||||
{props.todo.description && (
|
{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" />
|
<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>
|
</div>
|
||||||
{props.displayProject && props.todo.project && (
|
{props.displayProject && props.todo.project && (
|
||||||
<div className="text-gray-500 text-xs text-right whitespace-nowrap place-self-end">
|
<div className="text-gray-500 text-xs text-right whitespace-nowrap place-self-end">
|
||||||
|
@ -12,6 +12,7 @@ export interface Todo {
|
|||||||
description?: string;
|
description?: string;
|
||||||
status: StatusState;
|
status: StatusState;
|
||||||
project?: string;
|
project?: string;
|
||||||
|
authorId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const asTodo = (item: Todo): Todo => {
|
export const asTodo = (item: Todo): Todo => {
|
||||||
|
Loading…
Reference in New Issue
Block a user