code-corps / code-corps/code-corps-ember

Only task authors as well as project contributors or higher can edit task skills.

未關閉
#1,043 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
blocked Difficulty: Easy needs clarification needs design
主要語言
JavaScript
星號
120
分支
75
PR 合併指標
30 天內沒有已合併 PR

描述

# Problem

Right now on project/tasks/task.hbs, the UI to remove and add task skills is accessible by anyone.

We should change this so that only users who are able to edit tasks can interact with this part of the UI.

## Subtasks

- [ ] Wrap the `skill-button` collection as well as the `skill-typeahead` UI with an `{{#if (can 'edit task' task)}}` block
- [ ] Put a `{{related-skills}} component into the `else` part of the block.
- [ ] Fix any broken tests
- [ ] Add an acceptance test to `acceptance/task-editing-test.js` along the lines of "skills cannot be assigned to/from a task if user is not able to".
- [ ] Possibly: Add properties to `tests/pages/project/tasks/task.js` to support the above acceptance test. Something like `rendersTaskSkillsList`, `rendersRelatedSkills`, `rendersSkillsTypeahead`, etc.

貢獻指南

開啟貢獻指南

研究方向

從 project/tasks/task.hbs 開始,檢查現有的 skill-button、skill-typeahead 和 related-skills 用法。查看 acceptance/task-editing-test.js 以及 tests/pages/project/tasks/task.js 中的任務頁面物件,然後執行相關的驗收測試。完成的標準是:未授權使用者無法指派或移除任務技能,而已授權使用者仍保留編輯 UI。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
authorization, frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
52/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。