Commit 15d10a77 authored by Aishwarya Subramanian's avatar Aishwarya Subramanian

Removed enforce_pat_expiration feature flag

Administrators can now use the pat expiration setting
to toggle pat expiration.
The setting is defaulted to enabled (existing behavior)
This MR removes the feature flag for this feature.
parent dd37ba7f
......@@ -194,10 +194,7 @@ To do this:
## Optional enforcement of Personal Access Token expiry **(ULTIMATE SELF)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214723) in GitLab Ultimate 13.1.
> - It is deployed behind a feature flag, disabled by default.
> - It is disabled on GitLab.com.
> - It is not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-optional-enforcement-of-personal-access-token-expiry-feature). **(FREE SELF)**
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/296881) in GitLab 13.9.
GitLab administrators can choose to prevent personal access tokens from expiring
automatically. The tokens are usable after the expiry date, unless they are revoked explicitly.
......@@ -208,23 +205,6 @@ To do this:
1. Expand the **Account and limit** section.
1. Uncheck the **Enforce personal access token expiration** checkbox.
### Enable or disable optional enforcement of Personal Access Token expiry Feature **(FREE SELF)**
Optional Enforcement of Personal Access Token Expiry is deployed behind a feature flag and is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md) can enable it for your instance from the [rails console](../../../administration/feature_flags.md#start-the-gitlab-rails-console).
To enable it:
```ruby
Feature.enable(:enforce_pat_expiration)
```
To disable it:
```ruby
Feature.disable(:enforce_pat_expiration)
```
## Disabling user profile name changes **(PREMIUM SELF)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24605) in GitLab 12.7.
......
......@@ -47,8 +47,7 @@ module EE
end
def enforce_pat_expiration_feature_available?
License.feature_available?(:enforce_pat_expiration) &&
::Feature.enabled?(:enforce_pat_expiration, type: :licensed, default_enabled: false)
License.feature_available?(:enforce_pat_expiration)
end
end
......
---
title: Optional enforcement of PAT expiration
merge_request: 53660
author:
type: added
......@@ -247,16 +247,13 @@ RSpec.describe PersonalAccessToken do
subject { described_class.enforce_pat_expiration_feature_available? }
where(:feature_flag, :licensed, :result) do
true | true | true
true | false | false
false | true | false
false | false | false
where(:licensed, :result) do
true | true
false | false
end
with_them do
before do
stub_feature_flags(enforce_pat_expiration: feature_flag)
stub_licensed_features(enforce_pat_expiration: licensed)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment