1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

68 Commits

Author SHA1 Message Date
Fredrik Strand Oseberg
6520aa1b0c
Feat/impression data (#1310)
* feat: add impression data column

* fix: add default value to impressionData

* fix: allow client api to return impressionData

* fix: add tests for impressionData

* fix: reset server-dev

* fix: add test for adding a toggle with impression data on a different project

* fix: update tests
2022-02-03 11:06:51 +01:00
Fredrik Strand Oseberg
d2b4eef8ba
fix: set migration for feedbacK (#1315) 2022-01-31 09:57:33 +01:00
Ivar Conradi Østhus
19cb991cc9
fix: metric counters should use bigint (#1313) 2022-01-31 08:50:11 +01:00
Ivar Conradi Østhus
b8399abee0
fix: add migration for old feature events (#1300)
When we change the feature events we introduced a new column
on the events table to ease resolving of feature related events,
instead of knowing the types and require the data object to include
a name property. This commit adds a migration to make sure we
convert all feature events.

fixes: #1299
2022-01-26 13:39:59 +01:00
Youssef Khedher
b9d8c549e8
Merge pull request #1244 from Unleash/feat/update-toggle-type-description
feat: update feature types description
2022-01-21 09:05:21 +01:00
Youssef
f8c40d1137 refactor: create migration to update feature types description 2022-01-19 19:54:49 +01:00
sighphyre
0c78980502
feat: custom project roles (#1220)
* wip: environment for permissions

* fix: add migration for roles

* fix: connect environment with access service

* feat: add tests

* chore: Implement scaffolding for new rbac

* fix: add fake store

* feat: Add api endpoints for roles and permissions list

* feat: Add ability to provide permissions when creating a role and rename environmentName to name in the list permissions datastructure

* fix: Make project roles resolve correctly against new environments permissions structure

* fix: Patch migration to also populate permission names

* fix: Make permissions actually work with new environments

* fix: Add back to get permissions working for editor role

* fix: Removed ability to set role type through api during creation - it's now always custom

* feat: Return permissions on get role endpoint

* feat: Add in support for updating roles

* fix: Get a bunch of tests working and delete a few that make no sense anymore

* chore: A few small cleanups - remove logging and restore default on dev server config

* chore: Refactor role/access stores into more logical domains

* feat: Add in validation for roles

* feat: Patch db migration to handle old stucture

* fix: migration for project roles

* fix: patch a few broken tests

* fix: add permissions to editor

* fix: update test name

* fix: update user permission mapping

* fix: create new user

* fix: update root role test

* fix: update tests

* feat: Validation now works when updating a role

* fix: Add in very barebones down migration for rbac so that tests work

* fix: Improve responses from role resolution - getting a non existant role will throw a NotFound error

* fix: remove unused permissions

* fix: add test for connecting roles and deleting project

* fix: add test for adding a project member with a custom role

* fix: add test for changing user role

* fix: add guard for deleting role if the role is in use

* fix: alter migration

* chore: Minor code cleanups

* chore: Small code cleanups

* chore: More minor cleanups of code

* chore: Trim some dead code to make the linter happy

* feat: Schema validation for roles

* fix: setup permission for variant

* fix: remove unused import

* feat: Add cascading delete for role_permissions when deleting a role

* feat: add configuration option for disabling legacy api

* chore: update frontend to beta version

* 4.6.0-beta.0

* fix: export default project constant

* fix: update snapshot

* fix: module pattern ../../lib

* fix: move DEFAULT_PROJECT to types

* fix: remove debug logging

* fix: remove debug log state

* fix: Change permission descriptions

* fix: roles should have unique name

* fix: root roles should be connected to the default project

* fix: typo in role-schema.ts

* fix: Role permission empty string for non environment type

* feat: new permission for moving project

* fix: add event for changeProject

* fix: Removing a user from a project will now check to see if that project has an owner, rather than checking if any project has an owner

* fix: add tests for move project

* fix: Add in missing create/delete tag permissions

* fix: Removed duplicate impl caused by multiple good samaritans putting it back in!

* fix: Trim out add tag permissions, for now at least

* chore: Trim out new add and delete tag permissions - we're going with update feature instead

* chore: update frontend

* 4.6.0-beta.1

* feat: Prevent editing of built in roles

* fix: Patch an issue where permissions for variants/environments didn't match the front end

* fix: lint

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-01-13 11:14:17 +01:00
Youssef
0d6c440c69 feat: update feature types description 2022-01-07 11:25:10 +01:00
Ivar Conradi Østhus
573385a630 fix: drop client_metrics table 2021-12-10 09:31:54 +01:00
Youssef
26c9bfa3c8 fix: add timestamp on project creation for update_at column 2021-12-01 09:59:34 +01:00
Youssef
00f5740d18 fix: rename last_update to updated_at 2021-11-30 15:25:52 +01:00
Youssef
991a4a8634 add last-update migration to projects table 2021-11-30 10:40:58 +01:00
Ivar Conradi Østhus
eb8265922d
Fix/enable standard environments (#1134) 2021-11-26 15:31:36 +01:00
Fredrik Strand Oseberg
c369b77b24
Merge branch 'master' into feat/splash 2021-11-12 13:19:36 +01:00
Ivar Conradi Østhus
d8478dd928
feat: clean up events (#1089)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-11-12 13:15:51 +01:00
Youssef
16429fcf9a fix: add cascade query inside create table for splash 2021-11-12 13:01:56 +01:00
Youssef
fc275a6183 fix: update sql query in add-splash-entry 2021-11-12 11:02:12 +01:00
Youssef
c4e56aae09 fix: remove record splash and update sql query in add-splash-entry 2021-11-12 10:49:09 +01:00
Youssef
c4da3e89c5 fix: styling 2021-11-09 20:55:23 +01:00
Youssef
cc516618a1 add splash-controller and cascade migration 2021-11-09 14:16:34 +01:00
Fredrik Oseberg
d73293c576 fix: add migration 2021-11-09 11:52:02 +01:00
Youssef
875fb7734c create splash migration store and service file 2021-11-08 16:31:38 +01:00
Ivar Conradi Østhus
59f1c6e8e9
fix: add default sort order for built in envs (#1076) 2021-10-29 13:02:05 +02:00
Ivar Conradi Østhus
daba53976d
fix: feature_strategies paramter column should not be null (#1024) 2021-10-13 12:42:57 +02:00
Christopher Kolstad
20a4aeff97
Make Appinstance registration include environment (#1014) 2021-10-12 10:39:28 +02:00
Ivar Conradi Østhus
fc455811f8
feat/metricsV2 (#1005)
Adds a new way of handling usage metrics where we push it directly to the database and performs aggregation on the fly. All metrics are aggregated in to buckets of hours. We will for now store metrics for the 48 hours with the following dimensions:

- featureName
- projectName
- envrionment
- yes (the actual count)
- no (the actual count)
2021-10-08 10:09:22 +02:00
Christopher Kolstad
e3cebb21c8
task: add default environment (#989)
- Adds development and production environments.
- Connects default environment to all projects
- When creating a project connects the project to all enabled
  environments
2021-09-29 11:09:35 +02:00
Christopher Kolstad
c870b33ba6
task: remove displayName from environments (#988)
This will require a change in enterprise as well.
2021-09-29 10:23:43 +02:00
Ivar Conradi Østhus
b2f6b9e343
fix: envrionments should have type 2021-09-24 14:16:13 +02:00
Ivar Conradi Østhus
4b7e1f4a81
feat: rename :global: env to "default" (#947)
Our testing and internal validation has proven that
the :global: environment concept confuses people more
than the problems it solves. We have thus decided to
group all configuration that was created before the
environment concept was introduced in to the "default
environment. This would still make everything work
as before in addition to introducing the env concept.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-09-24 13:55:00 +02:00
Christopher Kolstad
0bca321219
fix: Enforce non-nullability of environment type (#950)
* fix: Enforce non-nullability of environment type
2021-09-24 09:11:36 +02:00
Christopher Kolstad
132e801836
Add UPDATE and DELETE TAG_TYPE permissions (#951) 2021-09-24 09:01:15 +02:00
Christopher Kolstad
f85f66d4f5
feat: add project and environment columns to events (#942)
* feat: add project and environment columns to events

* Added events for feature_strategy update

* fix duplicate test key for dbInit

* Fix argument list for toggleService calls in tests
2021-09-20 12:13:38 +02:00
Ivar Conradi Østhus
c4b697b57d
Feat/api key scoping (#941)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-09-15 20:28:10 +02:00
Fredrik Strand Oseberg
26c9d53b89
feat: Move environments to enterprise (#935)
- Adding, updating and renaming environments are meant to be
  enterprise only features, as such, this PR moves these operations out
  of this server

- We still keep sortOrder updating, toggling on/off and getting one,
  getting all, so we can still work with environments in the OSS version
  as well.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-09-13 15:57:38 +02:00
Christopher Kolstad
561c3d22e9
fix: Added indices and primary key to feature_tag (#936)
* fix: Added indices and primary key as recommended by dbcritic
2021-09-10 12:27:20 +02:00
Ivar Conradi Østhus
172ab43ea5
fix: make sure exising projects get :global: env automatically 2021-08-30 13:47:01 +02:00
Christopher Kolstad
ff7be7696c
fix: Stores as typescript and with interfaces. (#902)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-08-12 15:04:37 +02:00
Ivar Conradi Østhus
815a75a5b4
Wip/environments (#880)
Adds environment support

This PR adds environments as a first-class concept in Unleash.

It necessitated a full rewrite on how we connect feature <-> strategy, as well as a rethink on which levels environments makes sense.

This enables PUTs on strategy configurations for a feature, since all strategies now have ids.

This also updates export/import format. The importer handles both formats, but export is no longer possible in version 1 of the export format, only in version 2, with strategy configurations for a feature as a separate object.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-07-07 10:46:50 +02:00
Christopher Kolstad
eeeedbe65c
Added cascade to user_feedback foreign key 2021-06-18 12:17:09 +02:00
Fredrik Strand Oseberg
9f33285b03
Feat/pnps feedback (#862)
* feat: setup user feedback service

* fix: map rows

* feat: add tests

* wrap service calls in try catch

* fix: add test for retrieving feedback on user

* feat: add fake user feedback store

* fix: check ffor feedback id in controller

* feat: add test for bad request
2021-06-07 11:11:42 +02:00
Fredrik Strand Oseberg
ee1715d86a
fix: add migration (#847)
* fix: add migration

* fix: add empty down migration
2021-05-21 14:12:29 +02:00
Fredrik Strand Oseberg
48cad24bc7
feat: add migration (#832) 2021-05-04 21:42:58 +02:00
Christopher Kolstad
dd8e9207ad
feat: automatically add all existing users as owners to all existing … (#818)
* feat: automatically add all existing users as owners to all existing projects
2021-04-30 13:04:25 +02:00
Ivar Conradi Østhus
65fad95c6f
fix: migrate only users without any role 2021-04-28 12:56:19 +02:00
Ivar Conradi Østhus
517f3e2170
fix: migration to create root roles for users with permissions (#816)
* fix: migration to create root roles for users with permissions

needed to migrate enterprise users to rbac.

* fix: callback
2021-04-28 11:48:21 +02:00
Ivar Conradi Østhus
d12dc43b8f
fix: migration should call cb on down 2021-04-26 11:29:14 +02:00
Christopher Kolstad
c729f514cf
fix: make users emails case-insensitive (#804) 2021-04-23 15:30:23 +02:00
Ivar Conradi Østhus
b33e8e23f0
fix: migration rollback use DROP for column 2021-04-22 22:30:08 +02:00
Christopher Kolstad
7776f3c940
Fix/strategies sort order (#798)
* feat: add sort order field to strageies
* feat: update strategy display name and description

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-04-22 13:33:35 +02:00