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

Create owner role and prepare migration #127

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

akondas
Copy link
Member

@akondas akondas commented Apr 29, 2020

Next part of #56.
⚠️
Now everyone can do anything 😱 , so I have to create permissions.

@akondas akondas requested a review from karniv00l April 29, 2020 07:56
@@ -129,6 +129,7 @@
"@phpstan",
"@coverage-ci",
"bin/console lint:twig templates --show-deprecations",
"rm -rf var/cache/prod",
Copy link
Member Author

Choose a reason for hiding this comment

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

prevent fail when entity mapping changed

@codecov
Copy link

codecov bot commented Apr 29, 2020

Codecov Report

Merging #127 into members will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             members     #127   +/-   ##
==========================================
  Coverage      99.83%   99.83%           
- Complexity      1073     1087   +14     
==========================================
  Files            190      190           
  Lines           3083     3102   +19     
==========================================
+ Hits            3078     3097   +19     
  Misses             5        5           
Impacted Files Coverage Δ Complexity Δ
src/Entity/Organization.php 100.00% <100.00%> (ø) 36.00 <4.00> (+6.00)
src/Entity/Organization/Member.php 100.00% <100.00%> (ø) 8.00 <3.00> (+3.00)
src/Entity/Organization/Package.php 100.00% <100.00%> (ø) 22.00 <0.00> (ø)
src/Entity/User.php 100.00% <100.00%> (ø) 41.00 <2.00> (ø)
src/Query/Admin/Model/Organization.php 100.00% <100.00%> (ø) 5.00 <1.00> (-1.00)
.../Admin/OrganizationQuery/DbalOrganizationQuery.php 100.00% <100.00%> (ø) 5.00 <0.00> (ø)
src/Query/User/Model/Organization.php 100.00% <100.00%> (ø) 14.00 <9.00> (+6.00)
...y/User/OrganizationQuery/DbalOrganizationQuery.php 100.00% <100.00%> (ø) 17.00 <0.00> (ø)
src/Service/Organization/OrganizationVoter.php 100.00% <100.00%> (ø) 5.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3b5ab8...c24e449. Read the comment docs.

$this->addSql('ALTER TABLE organization_package ADD CONSTRAINT FK_13BAEFD632C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE organization_token ADD CONSTRAINT FK_D1B047FC32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE organization ADD CONSTRAINT FK_C1EE637C7E3C61F9 FOREIGN KEY (owner_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE user_oauth_token ADD CONSTRAINT FK_712F82BFA76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
Copy link
Member Author

Choose a reason for hiding this comment

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

shame 😞 it had to be lost when flattening migration

@@ -36,11 +34,6 @@ public function alias(): string
return $this->alias;
}

public function ownerEmail(): string
{
return $this->ownerEmail;
Copy link
Member Author

Choose a reason for hiding this comment

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

for now removed, maybe we will need members feature for admin (but for now it's not needed)

public function testNoneWhenNoOrganizations(): void
{
self::assertTrue(Option::none()->equals($this->user->firstOrganizationAlias()));
}
Copy link
Member Author

Choose a reason for hiding this comment

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

hmm, this should not be removed

@akondas akondas force-pushed the members-migration branch from 25cc19c to 764b5a0 Compare April 29, 2020 08:01
@akondas akondas force-pushed the members-migration branch from 764b5a0 to c24e449 Compare April 29, 2020 08:22
@karniv00l karniv00l merged commit 8ed97a1 into repman-io:members Apr 29, 2020
akondas added a commit that referenced this pull request Apr 29, 2020
karniv00l pushed a commit that referenced this pull request May 4, 2020
* Allow to manage organization members in UI (#118)

* Create owner role and prepare migration (#127)

* Implement members permissions (#128)

* Fix doctrine proxy and UI for organization members (#130)
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.

2 participants