-
Notifications
You must be signed in to change notification settings - Fork 102
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
feat(ui) : Strengthen sw360 admin privileges about Read and Write #1468
feat(ui) : Strengthen sw360 admin privileges about Read and Write #1468
Conversation
6c76697
to
e406b27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine to me.
However is it possible to have test cases running in github ci ? It would be nice to have these testcases as part of CI, If required there can be another stage in Build pipeline
-DRunComponentVisibilityRestrictionTest=false -DRunPrivateProjectAccessTest=false
OK |
e406b27
to
796101a
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
Signed-off-by: Kouki Hama <kouki1.hama@toshiba.co.jp>
796101a
to
830f463
Compare
I set another stage, Could you check it? |
While Testing the PR, facing some issue. Kindly confirm. Step -
|
Oh, I will check it soon. |
When I did with false option, maybe, I found similar logs.
But, anyway, I would like to check it again. |
Yes when the property is not set means when this feature is disabled. Is this expected? |
No. but it depends on how to restrict, group visibility. Now I also found the phenomenon which you mentioned, when the feature is disabled (that is to say, default setting), with (GROUP AND MODERETOR) Note: how to re-produce the phenomenon. (admin.private.project.access.enabled=false) admin1@sw360.org (department : role admin) make Project1 (GROUP AND MODERETOR) "admin1@sw360.org" can see info of Project2 @JaideepPalit |
I rechecked my this pull request and if (admin.private.project.access.enabled=false) , user can see only restricted project same with latest sw360. As I wrote in previous comment, If projects visibility is (GROUP AND MODERETOR) and admin user belong to the project's group, admin can see the project. This is the same with latest sw360 and expected result. Could you check it again? Maybe, you, as an admin,. saw other project, because visibility was (Group and moderator) and your admin account belonged the group. And For instruction (admin.private.project.access.enabled=true) case, I made movie (mp4) 00:00:00- log in admin@sw360.org 00:00:23- Displaying other users' Private and Me and Moderators setting projects on the "Project" screen 00:00:36- Private projects are displayed in the "Summary" screen of the project 00:00:52- Editing a "Private" project created by another user on the Edit Project screen 00:01:14- "Project" screen shows other users' Private and Me and Moderators projects 00:01:17- "Summary" screen of the project, showing Me and Moderators projects 00:01:29- Manipulate the "Link Projects" dialog 00:01:55- Manipulate the screen to see the results of linking |
Hi, This was observation before when I tested for first time. I followed the steps to test. But didnot set the properties in the sw360.properties.
It gives me the restricted project in search list of linked project. But when I add it gives error. |
Thanks @KoukiHama . I will continue with rest of the testing |
Code looks fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
working as described
Issue: #1290 #1412 #1450
The outline of a functional improvement
Purpose
This modification allows Admin user to access projects set by other users as PRIVATE or ME AND MODERATORS. This function can be enabled or disabled in the properties. (Default setting is disabled)
The outline of function change
Admin user can list all projects regardless of the project's visibility setting.
Figure1 List including projects set by other users as PRIVATE or ME AND MODERATORS
Admin user can view all projects regardless of the project's visibility settings.
Figure2 Project detail view.
Whether to enable the above functions can be changed by the configuration file.
This function is enabled only when the following values are added to sw360.properties.
admin.private.project.access.enabled=true
(If the value does not exist or false is specified, this function is disabled.)
Points of code change
The acquisition process of the accessible projects
Admin user can get all the project data from couchdb regardless of the visibility settings.
ProjectPermissions
Admin user has READ permission for projects created by other users regardless of the visibility.
Comparison of behavior when the function is enabled or disabled.
x : Access allowed
- : Access denied
How to do test
Execute RunPrivateProjectAccessTest as a visibility test.
RunPrivateProjectAccessTest is changed so that it can be tested by switching the enable / disable of the function by specifying the system property. (-DRunPrivateProjectAccessTest=true or false)
Check that the automated test passes in each case.