Skip to content

Conversation

NicolasToussaint
Copy link
Member

Description

A new option in the Customize page make all user details read-only (Username, email, Description)
Useful when details are retrieved from external auth server and should never be altered by hand.

Changes

New option in Customize page
image

How to test

Create User, details are editable
image

Go to Admin -> Customize, down the page, click on Make account details read-only
image

Check value in database:

fossology=# select variablename,conf_value from sysconfig where variablename='UserDescReadOnly';
   variablename   | conf_value 
------------------+------------
 UserDescReadOnly | true
(1 row)

Accounts become read-only
image

Operation is reversible.

@GMishx
Copy link
Member

GMishx commented Jan 3, 2022

Disabling the fields prevents HTML to add the data in POST request.

This causes any update request to fail :-(

It was solved in #2118 by reading missing information from DB. But there should be some more elegant way to solve it too.

snap

@GMishx GMishx removed their assignment Jan 3, 2022
@NicolasToussaint
Copy link
Member Author

Arg, my mistake : we actually identified this bug and realized that the fields should be tagged as readonly (with readonly="true") rather than disabled

image

That make the fields RO while preserving data when posting

@NicolasToussaint NicolasToussaint force-pushed the feat/user-details-read-only branch from 487d186 to 0c901c4 Compare January 3, 2022 13:41
@NicolasToussaint
Copy link
Member Author

Proposed this fix: 0c901c4

Meaning that maybe the other fix 36a1573 can be reverted ?

If OK, I can propose yet anotyher PR because I think I messed the Git Log :-/

@GMishx
Copy link
Member

GMishx commented Jan 4, 2022

Proposed this fix: 0c901c4

Looks good. I missed the readonly attribute :-)

Meaning that maybe the other fix 36a1573 can be reverted ?

Agree. Would you like to that in this PR or a separate one?

@NicolasToussaint
Copy link
Member Author

OK good ;
I will prepare a separate fresh PR

@GMishx GMishx deleted the feat/user-details-read-only branch January 4, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants