Commit Graph

28 Commits

Author SHA1 Message Date
Johannes Batzill
338271fb14 feat: [CODE-674]: user's space membership; membership API pagination (#241) 2023-07-26 20:53:42 +00:00
Johannes Batzill
c8ce82d197 [Standalone] Make Token Expiration Optional & Fix CLI Register + Login (#239) 2023-07-26 01:03:03 +00:00
Vistaar Juneja
551f2a9fd3 fix build error (#234) 2023-07-25 13:27:53 +00:00
Akhilesh Pandey
71ffa224f0 [CODE-621]: Add check to prevent last and only admin deletion (#205) 2023-07-25 04:03:43 +00:00
Johannes Batzill
45026edf2b Merge branch 'akp/deprecate-formvalue' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#188) 2023-07-19 00:01:25 +00:00
Johannes Batzill
ac84328a6b remove default value and allow empty grants 2023-07-18 16:54:40 -07:00
Johannes Batzill
478ae74e49 make grants optional for pat/sat create APIs 2023-07-18 16:45:33 -07:00
Akhilesh Pandey
d582d09ee1 CODE-620: Make admin password optional during startup (#204) 2023-07-18 13:09:26 +00:00
Akhilesh Pandey
e26e578da2 CODE-623: API to logout a user and delete the session token from database (#202) 2023-07-18 10:19:00 +00:00
Akhilesh Pandey
0cd95e7400 [CODE-619]: Remove unused function 2023-07-18 15:33:41 +05:30
Akhilesh Pandey
a57f4f22a9 Update user-admin update API to use the user_uid instead of user_id 2023-07-18 15:20:57 +05:30
Akhilesh Pandey
ee683aa2c8 Update struct attribute names and pass register logic from handler to controller 2023-07-18 00:57:06 +05:30
Akhilesh Pandey
03cc7de4f2 CODE-619: Update API to use UserID from Path 2023-07-14 20:50:00 +05:30
Akhilesh Pandey
29a9194437 CODE-619: Add Handler and Route for Service update admin 2023-07-14 20:12:57 +05:30
Akhilesh Pandey
07b04f2d77 CODE-619: Add Handler and Route for Service update admin 2023-07-14 20:10:43 +05:30
Akhilesh Pandey
959fb7b462 CODE-610: Remove FormValue and start using Query().Get() for all APIs doing get requests and sync required parameters in swagger schema 2023-07-12 21:16:07 +05:30
Johannes Batzill
36e8bdb368 [GITHA] Introduce Generic store Package (#143) 2023-06-20 00:26:40 +00:00
Johannes Batzill
bf9906c4ce [API] Add principals API, move users to admin, simplify user/service/serviceaccount validation (#300) 2023-02-03 00:15:11 -08:00
Johannes Batzill
06721dcf20 [Techdebt] merge user/service/serviceaccount stores into single principal store (#160)
This change merges the `UserStore`, `ServiceStore`, and `ServiceAccountStore` into a single `PrincipalStore`.
2023-01-05 15:58:18 -08:00
Marko Gaćeša
a79e187a88 DB & API refactor: Use snake case (#144)
Update DB and API to follow Harness Standard
2022-12-29 13:53:08 -08:00
Enver Bisevac
630c9b553f ordering imports linter and writer (#85) 2022-11-22 23:42:39 +01:00
Johannes Batzill
3ba0f75c8d Introduce UIDs for Space / Repo / Tokens, Add Custom Harness Validation, ... (#57)
This change adds the following:
- Space UID + Custom harness validation (accountId for top level space, harness identifier for child spaces)
- Repo UID + Custom harness validation (harness identifier)
- Store Unique casing of space / repo path and add Path.ValueUnique (with Unique index) to allow for application layer controlling the case sensitivity (case insensitive standalone vs partially case sensitive harness)
- Token UID (unique index over ownertype + ownerID + tokenUID)
- Add DisplayName for principals (replaces Name to avoid confustion)
- Store Unique casing of principal UID and add Principal.ValueUnique (with unique index) to allow for application layer, per principal type control of case sensitivity (required in embedded mode)
- Generate serviceAccount UID (+Email) Randomly (sa-{space|repo}-{ID}-{random}) - Allows to have a unique UID across all principals while reducing likelyhood of overlaps with users + avoid overlap across spaces / repos.
- Sync casing of space names (accountId orgId projectId) when creating spaces on the fly (to ensure case sensitivity of - harness code) or use the existing space to update casing.
- Update serviceaccount client to match updated NG Manager API
- in embedded mode create spaces for harness resources owning the service account
2022-11-06 23:14:47 -08:00
Johannes Batzill
c0258b34ef Add search capability to repo and space listing (for child spaces) (#44)
This change is adding search capability to the following apis:
- child repositories
- child spaces
*NOTE* The search space is limited to direct child repos/spaces.
2022-10-24 18:57:55 -07:00
Johannes Batzill
5337c46a4f Add Query and Sorting Capability to ListBranches API (#42)
This change adds the following to the list branches api:
- 'query' parameter for querying branches using arbitrary substrings
- 'sort' parameter for sorting the branches (name and date supported)
- 'direction' parameter for specifing the direction of the sorted output
2022-10-21 20:45:26 -07:00
Johannes Batzill
743aee6029 [API] Add List Branches, Improve latestCommit Performance for listing directory (#38)
This commit has the following changes:
- API for listing branches
- Improve performance of content API for dir type responses with includeCommit=true
- swagger for git operations
- fix file names from camelCase to kebab_case
2022-10-17 23:05:50 -07:00
Enver Bisevac
00647d7d1b [MAINT] golangci-lint config changed (#31)
* goheader linter added

* file header consistency
2022-10-13 14:39:15 +02:00
Johannes Batzill
5786ad2409 [Embedded] Harness Router, Inline Space Creation, Bootstrap, Harness/Admin User Setup (#28)
Adds the basic for harness embedded mode:
- Harness dedicated router with custom APIHandler
- Inline Space Creation
- Client for Account/Org/Project
- Bootstrap (Allows for automated creation of admin user and gitness service (used for all platform required ops))
- Inline harness service principal creation
- Ignore flag for ACL.
2022-10-10 21:32:14 -07:00
Johannes Batzill
fad6e18898 Introduce Controller for Repo, Space, User, and ServiceAccount (#25)
Preparing the support for harness specific API router + http handler, which allows us to have complete control over the rest api naming and functionality, without having to do complex path rewrites or request / reponse rewrites inline.
2022-10-03 18:56:49 -07:00