Skip to content

Conversation

danrot
Copy link
Contributor

@danrot danrot commented Jul 14, 2015

This PR considers the security of documents in the API and therefore in the column navigation.
Merge together with massiveart/husky#516 and sulu/sulu-document-manager#30 (tests won't run before)
tasks:

  • test coverage
  • gather feedback for my changes

informations:

q a
Fixed tickets fixes #470
BC breaks none
Documentation PR none

@danrot danrot mentioned this pull request Jul 14, 2015
3 tasks
@danrot danrot force-pushed the feature/page-list-security branch from dc5097d to 11d3242 Compare July 14, 2015 06:56
@danrot
Copy link
Contributor Author

danrot commented Jul 14, 2015

@dantleech I am having a small issue with the PropertyEncoder here. It is not really designed to be extendable, and I am not sure if having methods like localizedSystemName in https://github.com/sulu-io/sulu-document-manager/blob/master/lib/PropertyEncoder.php#L38 is a good idea. I would prefer to remove this methods, and just leave formatName and formatLocalizedName as public methods there. This way it would be a lot easier to extend the system with an own namespace, and the NamespaceRegistry will throw a good error anyway.

@danrot danrot force-pushed the feature/page-list-security branch from 733c47a to 4ea19e7 Compare July 14, 2015 11:33
'name' => $this->adminName,
'locales' => $this->locales,
'suluVersion' => $this->suluVersion,
'user' => json_decode(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couldn't find a better solution ATM... It would be awesome if the serializer would support arrays, but AFAIK it doesn't ...

@danrot danrot force-pushed the feature/page-list-security branch 5 times, most recently from 6034992 to 1271a22 Compare July 29, 2015 07:46
$permissions = [];
foreach ($node->getProperties('sec:*') as $property) {
/** @var PropertyInterface $property */
$roleName = 'ROLE_' . strtoupper(str_replace('-', '_', substr($property->getName(), 4)));
Copy link
Member

Choose a reason for hiding this comment

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

extract 'ROLE_' into a const.

@wachterjohannes
Copy link
Member

@danrot it works for new saved permissions but not with old ones ... i think we should provide a migration!

@danrot danrot force-pushed the feature/page-list-security branch from 1aa7b2d to f82b65a Compare July 29, 2015 12:41
@danrot
Copy link
Contributor Author

danrot commented Jul 29, 2015

The migrations would definitely make sense, but I won't be able to implement that before coming back from holiday.

@wachterjohannes
Copy link
Member

@chirimoya what did you think? should we merge it without migration or should we wait until daniel is back from holiday?

@chirimoya
Copy link
Member

@wachterjohannes we should wait for the migrations. /cc @danrot

@danrot danrot force-pushed the feature/page-list-security branch from 3bf1375 to 0aad0aa Compare August 10, 2015 07:13
@danrot danrot force-pushed the feature/page-list-security branch from 068be00 to ad67b73 Compare August 10, 2015 12:00
@danrot danrot force-pushed the feature/page-list-security branch from ee14731 to 8b02754 Compare August 11, 2015 08:41
@danrot danrot force-pushed the feature/page-list-security branch from 9789041 to e2615d0 Compare August 12, 2015 13:19
@wachterjohannes
Copy link
Member

if your not allowed to view a page you can double click on the name and get an 403 error. also i can change the permission of a page where i have only view rights ...

@wachterjohannes
Copy link
Member

@danrot the rest seems to work after created saving and copying a few pages!

@danrot
Copy link
Contributor Author

danrot commented Aug 17, 2015

You can change the permission if you have the security permission for the given security context. But the double click is really a bug...

@danrot
Copy link
Contributor Author

danrot commented Aug 17, 2015

The bug with the double needs also a husky change: massiveart/husky#526

wachterjohannes added a commit that referenced this pull request Aug 17, 2015
@wachterjohannes wachterjohannes merged commit eaaea3a into develop Aug 17, 2015
@wachterjohannes wachterjohannes deleted the feature/page-list-security branch August 17, 2015 13:43
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.

[SecurityBundle] Get rid of sulu_security.user_manager service
3 participants