gitlab-org--gitlab-foss/app/policies
Stan Hu 6fa5f510e8 Guard against deleted project feature entry
In https://gitlab.com/gitlab-org/gitlab-ce/issues/66482, we see that a
project's `project_feature` association may be lazily loaded and hence
return `nil` if the entry is deleted if the `Project` is already loaded
in memory. To ensure we don't fail hard when this happens, assume all
features are disabled.

We can fix this issue by eager loading the `project_feature` in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32169, but we
shouldn't have to depend on that.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66482
2019-08-26 13:37:42 -07:00
..
application_setting Disable existing offenses for the CodeReuse cops 2018-09-11 17:32:00 +02:00
ci Allow use of legacy triggers with feature flag 2019-07-15 15:05:22 +02:00
clusters Refactor: model errors for multi cluster validation 2019-07-11 17:22:58 +10:00
concerns Refactor: model errors for multi cluster validation 2019-07-11 17:22:58 +10:00
namespace Expose namespace storage statistics with GraphQL 2019-08-22 22:08:28 +00:00
project_policy Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
award_emoji_policy.rb GraphQL mutations for add, remove and toggle emoji 2019-06-28 12:03:33 +12:00
base_policy.rb preventing blocked users and their PipelineSchdules from creating new Pipelines 2019-06-04 20:25:26 -05:00
board_policy.rb Fix 403 errors when adding an assignee list in project boards 2019-02-14 13:41:43 -08:00
commit_policy.rb Merge branch 'security-guest-comments' into 'master' 2018-11-28 19:11:56 -05:00
commit_status_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
container_repository_policy.rb Add Container Registry API 2019-01-25 13:13:48 +01:00
deploy_key_policy.rb Disable existing offenses for the CodeReuse cops 2018-09-11 17:32:00 +02:00
deploy_token_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
deployment_policy.rb Allow to make builds soft-archived. 2018-11-05 15:51:57 +01:00
environment_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
external_issue_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
global_policy.rb Restrict slash commands to users who can log in 2019-07-19 11:32:06 +02:00
group_label_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
group_member_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
group_policy.rb Expose namespace storage statistics with GraphQL 2019-08-22 22:08:28 +00:00
identity_provider_policy.rb Move out link\unlink ability checks to a policy 2019-03-19 15:38:16 +03:00
issuable_policy.rb Disallow reopening of locked merge requests 2019-03-08 08:34:20 +00:00
issue_policy.rb Prevent comments by email when issue is locked 2019-01-31 16:52:48 +01:00
merge_request_policy.rb Disallow reopening of locked merge requests 2019-03-08 08:34:20 +00:00
milestone_policy.rb Suggests issues when typing title 2018-11-27 15:10:40 +00:00
namespace_policy.rb Expose namespace storage statistics with GraphQL 2019-08-22 22:08:28 +00:00
nil_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
note_policy.rb Prevent award_emoji to notes not visible to user 2019-01-31 16:51:17 +01:00
personal_snippet_policy.rb Remove the `comment_personal_snippet` permission 2019-05-02 11:13:42 +01:00
project_label_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
project_member_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
project_policy.rb Guard against deleted project feature entry 2019-08-26 13:37:42 -07:00
project_snippet_policy.rb Prevent comments by email when issue is locked 2019-01-31 16:52:48 +01:00
project_statistics_policy.rb Do not blindly expose public project statistics 2019-06-14 20:40:21 +00:00
protected_branch_policy.rb Enable frozen string in presenters and policies 2018-07-24 13:18:25 -07:00
release_policy.rb Add spec for Release API 2018-12-31 14:35:57 +09:00
repository_policy.rb Enforce authorizations for non-nullable fields 2019-06-21 13:00:50 +02:00
suggestion_policy.rb Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00
user_policy.rb Allow users to set a status 2018-07-30 15:01:26 +02:00