summaryrefslogtreecommitdiff
path: root/app/policies
Commit message (Collapse)AuthorAgeFilesLines
* Guard against deleted project feature entryStan Hu2019-08-261-0/+2
| | | | | | | | | | | | | | 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
* Expose namespace storage statistics with GraphQLAlessio Caiazza2019-08-223-0/+8
| | | | | | | | | | | | | | | | | | | Root namespaces have storage statistics. This commit allows namespace owners to get those stats via GraphQL queries like the following one { namespace(fullPath: "a_namespace_path") { rootStorageStatistics { storageSize repositorySize lfsObjectsSize buildArtifactsSize packagesSize wikiSize } } }
* Allow disabling group/project email notificationsBrett Walker2019-08-152-0/+2
| | | | | | - Adds UI to configure in group and project settings - Removes notification configuration for users when disabled at group or project level
* Merge remote-tracking branch ↵John T Skarbek2019-08-141-0/+3
|\ | | | | | | 'dev/security-2873-restrict-slash-commands-to-users-who-can-log-in'
| * Restrict slash commands to users who can log inHordur Freyr Yngvason2019-07-191-0/+3
| |
* | Add group level container repository endpointsSteve Abrams2019-08-051-0/+1
| | | | | | | | | | | | | | API endpoints for requesting container repositories and container repositories with their tag information are enabled for users that want to specify the group containing the repository rather than the specific project.
* | Remove code related to object hierarchy in MySQLremove-nested-groups-checksHeinrich Lee Yu2019-07-251-4/+2
| | | | | | | | | | These are not required because MySQL is not supported anymore
* | Add policy to allow maintainers to create subgroups when enabledFabio Papa2019-07-191-0/+5
| |
* | Reset group policy to only allow >= owners to create subgroupsFabio Papa2019-07-191-1/+1
| |
* | Update the group policy to allow >= maintainer to create subgroupsFabio Papa2019-07-191-1/+1
|/ | | | All specs passing
* Allow use of legacy triggers with feature flagFabio Pitino2019-07-151-1/+1
| | | | | | | | | Keep feature flag disabled by default and turn off all functionality related to legacy triggers. * Block legacy triggers from creating pipeline * Highlight legacy triggers to be invalid via the UI * Make legacy triggers invalid in the model
* Refactor: model errors for multi cluster validationDylan Griffith2019-07-114-34/+0
| | | | | | | | | | | The current approach requires catching exceptions to handle these errors and callers are already handling model validations so it seems more appropriate. Also it seemed to convoluted to add this logic directly to the model since the model needs to check too many possible associations to determine whether or not there are more than one cluster since the model doesn't know what it's being created on. Additionally we only wanted to validate during create to avoid the risk of existing models becoming invalid by many different edge cases.
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceMarin Jankovski2019-07-032-2/+12
|\
| * Merge branch '62826-graphql-emoji-mutations' into 'master'Jan Provaznik2019-06-281-0/+11
| |\ | | | | | | | | | | | | GraphQL mutations for add, remove and toggle emoji See merge request gitlab-org/gitlab-ce!29919
| | * GraphQL mutations for add, remove and toggle emoji62826-graphql-emoji-mutationsLuke Duncalfe2019-06-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding new `AddAwardEmoji`, `RemoveAwardEmoji` and `ToggleAwardEmoji` GraphQL mutations. Adding new `#authorized_find_with_pre_checks!` and (unused, but for completeness `#authorized_find_with_post_checks!`) authorization methods. These allow us to perform an authorized find, and run our own additional checks before or after the authorization runs. https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
| * | Remove instance_clusters feature_flagremove_group_and_instance_clusters_feature_flagThong Kuah2019-06-281-2/+1
| |/ | | | | | | | | | | Now we have terminals for instance and group clusters we can remove the FF now. Deploying to instance clusters has been working without complaints too.
* | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqMarin Jankovski2019-07-031-0/+5
|\ \ | |/ |/|
| * Enforce authorizations for non-nullable fieldsBob Van Landuyt2019-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure we also enforce authorizations for non-nullable fields. We are defining our authorizations on the unwrapped types (Repository). But when a type like that is presented in a non-nullable field, it's type is different (Repository!). The non-nullable type would not have the authorization metadata. This makes sure we check the metadata on the unwrapped type for finding authorizations.
* | Move Multiple Issue Boards for Projects to Core53811-issue-boards-to-core-projects-backend-ceAlexandru Croitor2019-06-261-0/+3
|/ | | | | Refactor code to allow multiple issue boards management for projects in CE
* Add documentation and testsManoj MJ2019-06-191-0/+1
| | | | | | | | This commit adds - feature specs - to test the ability of a user with "developer" permission to delete tags in repositories. - documentation
* Merge branch 'error-pipelines-for-blocked-users' into 'master'Grzegorz Bizon2019-06-173-4/+8
|\ | | | | | | | | | | | | Preventing blocked users and their PipelineSchdules from creating new Pipelines Closes #47756 See merge request gitlab-org/gitlab-ce!27318
| * preventing blocked users and their PipelineSchdules from creating new Pipelinesdrew cimino2019-06-043-4/+8
| | | | | | | | updated several specs and factories to accomodate new permissions
* | Allow Developer role to delete tags via container registry apiJason Goodman2019-06-171-0/+1
| | | | | | | | This brings the API permissions in line with the UI permissions
* | Do not blindly expose public project statisticsMayra Cabrera2019-06-141-0/+5
| | | | | | | | Add the missing check on GraphQL API for project statistics
* | API issues - minor cleanup of permission checkJan Provaznik2019-06-111-0/+1
|/ | | | | | Adds `set_issue_updated_at` similar to `set_issue_created_at` permission and cleans up the related permission check in issues API.
* SSO enforcement for project resourcesce-jej/group-saml-project-enforcementJames Edwards-Jones2019-05-081-0/+4
|
* Merge branch 'ce-jej/group-saml-sso-enforcement' into 'master'Robert Speicher2019-05-071-1/+5
|\ | | | | | | | | CE changes for SSO web enforcement See merge request gitlab-org/gitlab-ce!28141
| * CE changes for SSO web enforcementce-jej/group-saml-sso-enforcementJames Edwards-Jones2019-05-061-1/+5
| | | | | | | | | | | | Adds two methods for us to extend in EE: - OmniauthCallbacksController#link_identity - GroupPolicy#lookup_access_level!
* | Convert instance level clusters enabled to class methodJames Fargher2019-05-071-1/+1
| |
* | Check instance cluster feature at policy levelJames Fargher2019-05-071-1/+2
| | | | | | | | Try to simplify feature flag checks by using policies
* | Instance level kubernetes clusters adminJames Fargher2019-05-072-0/+21
|/ | | | | Instance level clusters were already mostly supported, this change adds admin area controllers for cluster CRUD
* Allow usage of quick actions for internal usersPeter Leitzen2019-05-061-1/+0
| | | | Just prevent support bots from using quick actions in EE
* Allow guests users to access project releasesKrasimir Angelov2019-05-031-1/+1
| | | | | | | | | | | | | | | | | | This is step one of resolving https://gitlab.com/gitlab-org/gitlab-ce/issues/56838. Here is what changed: - Revert the security fix from bdee9e8412d. - Do not leak repository information (tag name, commit) to guests in API responses. - Do not include links to source code in API responses for users that do not have download_code access. - Show Releases in sidebar for guests. - Do not display links to source code under Assets for users that do not have download_code access. GET ':id/releases/:tag_name' still do not allow guests to access releases. This is to prevent guessing tag existence.
* Remove the `comment_personal_snippet` permissionremove-comment-personal-snippet-permissionSean McGivern2019-05-021-8/+5
| | | | | | | | | This is now entirely handled by `create_note`: 1. Project snippets prevent `create_note`. 2. Uploads already only support routing for personal snippets. This simplifies some policies and access checks, too!
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-092-1/+36
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Add new permission model `read-pipeline-variable`Agustin Henze2019-04-091-0/+12
| | | | | | | Used to get the variables via the API endpoint `/projects/:id/pipelines/:pipeline_id/variables` Signed-off-by: Agustin Henze <tin@redhat.com>
* Add part of needed codeGosia Ksionek2019-04-051-0/+11
| | | | | | | | | | | | | | | | | Add columns to store project creation settings Add project creation level column in groups and default project creation column in application settings Remove obsolete line from schema Update migration with project_creation_level column existence check Rename migrations to avoid conflicts Update migration methods Update migration method
* Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"Andreas Brandl2019-04-052-36/+1
| | | This reverts merge request !26823
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-052-1/+36
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Add a Prometheus API per environmentrpereira22019-04-051-0/+1
| | | | | | The api will proxy requests to the environment's prometheus server. The Prometheus::ProxyService class can be reused when we add support for group prometheus servers.
* Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ↵jarv/dev-to-gitlab-2019-04-02John Jarvis2019-04-021-1/+1
|\ | | | | | | jarv/dev-to-gitlab-2019-04-02
| * Disallow guest users from accessing ReleasesShinya Maeda2019-03-261-1/+1
| | | | | | | | As they do not have a permission to read git tag
* | Show statistics also when repository is disabledPeter Marko2019-03-231-0/+1
|/
* Move out link\unlink ability checks to a policyPavel Shutsin2019-03-191-0/+15
| | | | We can extend the policy in EE for additional behavior
* Update group policy to reflect all the requirementsMałgorzata Ksionek2019-03-131-1/+2
|
* Disallow reopening of locked merge requestsJan Beckmann2019-03-083-0/+5
| | | | Fixes #56864
* API: delete job_artifacts of a single jobRoger Rüttimann2019-03-061-0/+1
|
* Merge branch '56809-graphql-version-api' into 'master'Douwe Maan2019-03-051-0/+4
|\ | | | | | | | | Add metadata about the GitLab server to GraphQL See merge request gitlab-org/gitlab-ce!24636
| * Add metadata about the GitLab server to GraphQLNick Thomas2019-03-051-0/+4
| |
* | Display the correct number of MRs a user has access toIgor Drozdov2019-03-051-1/+1
|/