Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOISSUE - Update self register environment variable name #1493

Merged
merged 2 commits into from
Nov 3, 2021

Conversation

buraksekili
Copy link
Contributor

What does this do?

This PR updates the name of the environment variable responsible for allowing user creation by everybody or not. The previous name of it was MF_ONLY_ADMIN_CREATES_USER. Now, it is updated to MF_USERS_ALLOW_SELF_REGISTER which is a boolean variable. If MF_USERS_ALLOW_SELF_REGISTER is true, everybody can create a new user. Otherwise, only the admin can create a new user. Also, MF_USERS_ALLOW_SELF_REGISTER is true by default.

Furthermore, this PR updates the default admin creation process. The previous version was not checking the existence of the policy if MF_USERS_ALLOW_SELF_REGISTER is true. However, if MF_USERS_ALLOW_SELF_REGISTER is true, the policy has to be created. Therefore, this PR adds checking the existence of that policy when MF_USERS_ALLOW_SELF_REGISTER is true.

Which issue(s) does this PR fix/relate to?

-

List any changes that modify/break current functionality

Update the environment variable.

Have you included tests for your changes?

No

Did you document any new/modified functionality?

Notes

* NOISSUE - Update naming of env variable

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Update env variable type to boolean

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* update environment variable name

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>

update comment of selfregister

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
@buraksekili buraksekili requested a review from a team as a code owner November 3, 2021 09:19
@codecov-commenter
Copy link

Codecov Report

Merging #1493 (5134d10) into master (90e4561) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1493      +/-   ##
==========================================
- Coverage   68.82%   68.80%   -0.02%     
==========================================
  Files         132      132              
  Lines       10581    10581              
==========================================
- Hits         7282     7280       -2     
- Misses       2724     2726       +2     
  Partials      575      575              
Impacted Files Coverage Δ
things/service.go 73.59% <0.00%> (-0.87%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90e4561...5134d10. Read the comment docs.

Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dborovcanin dborovcanin merged commit dc93585 into absmach:master Nov 3, 2021
fbugarski pushed a commit to fbugarski/mainflux that referenced this pull request Nov 17, 2021
* NOISSUE - Update naming of env variable (absmach#1484)

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
mteodor pushed a commit to mteodor/mainflux that referenced this pull request Dec 23, 2021
* NOISSUE - Update naming of env variable (absmach#1484)

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
bioinformatx pushed a commit to bioinformatx/mainflux that referenced this pull request Jan 28, 2022
* NOISSUE - Update naming of env variable (absmach#1484)

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: skovacevic <stefan.kovacevic@mainflux.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants