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

[OP#46177] create user and group openproject #358

Merged
merged 16 commits into from
Feb 28, 2023

Conversation

SwikritiT
Copy link
Contributor

@SwikritiT SwikritiT commented Feb 14, 2023

Related workpackages

OP#46177 - https://community.openproject.org/projects/nextcloud-integration/work_packages/46177/activity
OP#46175 - https://community.openproject.org/projects/nextcloud-integration/work_packages/46175/activity

Desciption

This PR implements following

  1. Creates a user openproject that can neither be disabled or deleted
  2. Creates a group openproject that cannot be deleted
  3. Makes user openproject the admin of group openproject
  4. Forbids the user openproject to logging through front end

@SwikritiT SwikritiT changed the title Implementation/create user openproject create user openproject Feb 15, 2023
@SwikritiT SwikritiT changed the title create user openproject [OP#46177] create user openproject Feb 15, 2023
@SwikritiT SwikritiT force-pushed the implementation/create-user-openproject branch 2 times, most recently from 8051695 to 9d73898 Compare February 15, 2023 07:03
@SwikritiT SwikritiT changed the title [OP#46177] create user openproject [OP#46177] create user and group openproject Feb 15, 2023
@individual-it
Copy link
Collaborator

The user still can be renamed and disabled, also the group can be disabled. We need to see if that also can be circumvented

@SwikritiT SwikritiT marked this pull request as draft February 20, 2023 06:25
@SwikritiT SwikritiT force-pushed the implementation/create-user-openproject branch from 012bedd to bff2382 Compare February 22, 2023 06:50
@SwikritiT SwikritiT marked this pull request as ready for review February 23, 2023 07:09
Copy link
Collaborator

@individual-it individual-it left a comment

Choose a reason for hiding this comment

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

looks good to me, but let's merge on Monday

Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
SwikritiT and others added 5 commits February 27, 2023 15:00
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
@SagarGi SagarGi force-pushed the implementation/create-user-openproject branch from ea806d1 to 3e27727 Compare February 27, 2023 09:17
Copy link
Collaborator

@SagarGi SagarGi left a comment

Choose a reason for hiding this comment

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

Looks Good to me. Checked it for integration script.

@github-actions
Copy link

JS Code Coverage

Coverage after merging implementation/create-user-openproject into master will be
93.82%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   adminSettings.js0%0%0%0%1, 1, 10–19, 2, 20–25, 3–9
   bootstrap.js0%0%0%0%1, 1–7
   dashboard.js0%0%0%0%1, 1, 10–19, 2, 20–27, 3–9
   fileActions.js0%0%0%0%1, 1, 10–17, 2–9
   personalSettings.js0%0%0%0%1, 1, 10–19, 2, 20–25, 3–9
   projectTab.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–66, 7–9
   utils.js57.45%33.33%50%59.52%10–14, 17–26, 6–9
src/components
   AdminSettings.vue99.24%95.92%82.35%99.86%1, 1, 1
   OAuthConnectButton.vue99.09%80%100%100%1
   PersonalSettings.vue98.88%91.67%83.33%100%1
src/components/admin
   FieldValue.vue95.56%62.50%100%98.77%1, 1, 1, 1
   FormHeading.vue98.98%75%100%100%1
   TextInput.vue98.46%80%87.50%100%1, 1, 1
src/components/icons
   ClippyIcon.vue93.18%50%50%97.50%1, 1
src/components/settings
   CheckBox.vue92.45%80%66.67%97.62%1, 1
   SettingsTitle.vue94.74%50%100%97.14%1, 1
src/components/tab
   EmptyContent.vue99.34%90.91%100%100%1
   SearchInput.vue99.56%83.33%100%100%1
   WorkPackage.vue99.01%33.33%100%99.66%1, 1, 1
src/utils
   workpackageHelper.js97.46%96%100%97.75%17–19
src/views
   Dashboard.vue98.36%50%50%99.66%1, 1, 1
   ProjectsTab.vue99.74%92.31%100%100%23

@github-actions
Copy link

PHP Code Coverage

Coverage after merging implementation/create-user-openproject into master will be
58.14%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
server/apps/integration_openproject/lib/AppInfo
   Application.php12.90%100%25%11.11%100–102, 113, 117, 64–65, 68, 75, 77–79, 81–84, 88–91, 93, 97–99
server/apps/integration_openproject/lib/BackgroundJob
   RemoveExpiredDirectUploadTokens.php0%100%0%0%42, 44–46, 55–56
server/apps/integration_openproject/lib/Controller
   ConfigController.php63.91%100%50%64.81%131, 148–149, 151, 153–155, 157–158, 163–164, 166, 228–234, 326–327, 456–459, 461–462, 465, 473, 484, 498–500, 515–519, 521–524, 526–528, 546–553, 555, 557, 560–562, 564–566, 580, 588–591, 593–596, 606–611
   DirectDownloadController.php0%100%0%0%36–38, 53–55, 57, 60–61
   DirectUploadController.php70.54%100%100%69.44%118, 164, 175, 179–182, 184, 194, 201, 215–217, 219–220, 223–225, 231, 233, 236, 238–239, 246–247, 250–251, 254–255, 275, 288, 293, 299
   FilesController.php73.74%100%100%72.04%168, 221–222, 267, 273–277, 281–283, 285, 287, 298–300, 303–304, 306–307, 311–314, 317
   OpenProjectAPIController.php85.07%100%78.57%85.56%136, 171, 188–189, 193, 197, 199–204, 206, 215–216, 219, 221, 223–226, 228–229, 234, 253, 278, 95
server/apps/integration_openproject/lib/Dashboard
   OpenProjectWidget.php0%100%0%0%101–102, 104–108, 116, 123–124, 126, 128–129, 131–132, 134, 137–138, 140–141, 143, 69–73, 80, 87, 94
server/apps/integration_openproject/lib/Exception
   OpenprojectErrorException.php100%100%100%100%
   OpenprojectFileNotUploadedException.php100%100%100%100%
   OpenprojectResponseException.php100%100%100%100%
   OpenprojectUserOrGroupAlreadyExistsException.php0%100%0%0%16
server/apps/integration_openproject/lib/Listener
   BeforeGroupDeletedListener.php0%100%0%0%45, 53–54, 57–60
   BeforeUserDeletedListener.php0%100%0%0%45, 52–53, 55–58
   BeforeUserLoggedInListener.php0%100%0%0%45, 53–54, 56–58
   LoadSidebarScript.php0%100%0%0%100–101, 103–104, 106, 108, 65–70, 72–73, 75–76, 78–79, 85–86, 88, 90, 92–94, 96, 98
   UserChangedListener.php0%100%0%0%49, 56–57, 60–64
server/apps/integration_openproject/lib/Migration
   Version2001Date20221213083550.php0%100%0%0%47, 57, 60, 63, 67, 70, 73, 77–79, 81
   Version2310Date20230116153411.php0%100%0%0%46, 49–52, 54–56, 60, 64, 68, 72, 76, 81–82, 84
server/apps/integration_openproject/lib/Search
   OpenProjectSearchProvider.php0%100%0%0%100, 103, 110–111, 114–127, 129–130, 132–133, 135–137, 140–141, 143–144, 148–149, 151–153, 159–160, 162, 171, 179–185, 194–199, 72–76, 83, 90, 98
   OpenProjectSearchResultEntry.php100%100%100%100%
server/apps/integration_openproject/lib/Service
   DatabaseService.php43.90%100%60%41.67%125–128, 131, 80–87, 89–93, 95–97
   DirectDownloadService.php88%100%100%86.96%65–66, 68
   DirectUploadService.php54.55%100%66.67%52.63%112, 118, 79–82, 84, 89, 91
   OauthService.php0%100%0%0%37–38, 47–53, 55, 64–67, 78–85, 95–99
   OpenProjectAPIService.php76.66%100%80%76.37%130–134, 305–306, 308, 322–323, 332, 336, 357, 445–446, 453, 456–459, 461, 467, 471–473, 493, 502–505, 509–511, 516–518, 521–523, 525, 528–529, 532, 698, 769, 799–800, 802, 804–805, 828, 832, 836–837, 840–843, 845–846, 848–849, 851–852, 860–863, 865
server/apps/integration_openproject/lib/Settings
   Admin.php0%100%0%0%32–34, 41–43, 46–50, 53, 58–59, 62, 64–65, 67, 71, 75
   AdminSection.php0%100%0%0%19–20, 29, 39, 48, 55
   Personal.php87.88%100%50%93.10%94, 98
   PersonalSection.php0%100%0%0%19–20, 29, 39, 48, 55

@individual-it individual-it merged commit 3e20284 into master Feb 28, 2023
@delete-merged-branch delete-merged-branch bot deleted the implementation/create-user-openproject branch February 28, 2023 05:49
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.

3 participants