Vote #72635
完了User#allowed_to? should return true or false
0%
説明
The attached patch fixes a minor bug in User.allowed_to?
Specifically, that method should return a boolean, but it actually sometimes returns a Role instead. This is because .detect is used when really .any? should be used.
I am not aware of this causing any serious issues, but I noticed this during debugging and was greatly confused when allowed_to? suddenly returned a Role ;).
journals
--------------------------------------------------------------------------------
Committed in r10614. Another change was required so that @User#allowed_to?@ return true or false and tests were updated.
--------------------------------------------------------------------------------
Admin Redmine さんが約4年前に更新
- カテゴリ を Code cleanup/refactoring_30 にセット
- 対象バージョン を 2.2.0_56 にセット