U4-7248 - Can't update roles on public access

Created by Sebastiaan Janssen 14 Oct 2015, 09:04:22 Updated by Sebastiaan Janssen 22 Oct 2015, 13:38:21

Is duplicated by: U4-7291

As reported here: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/71939-public-access-and-multiple-group-in-73

Comments

Sebastiaan Janssen 14 Oct 2015, 09:04:47

Fixed in: https://github.com/umbraco/Umbraco-CMS/commit/e0619edabb9964bd5998994b2b16af559c3817ce


Sebastiaan Janssen 14 Oct 2015, 09:14:05

And updated unit test (which was wrong in the first place) - https://github.com/umbraco/Umbraco-CMS/commit/62897f70640182a548d9ddf3344c76575f6012c1


Sebastiaan Janssen 14 Oct 2015, 09:38:01

This test was just wrong, you can't "update" a rule, you can add a role, you can remove a role but you can't "rename" the role. Changed this test into checking if a rule can be removed instead.

https://github.com/umbraco/Umbraco-CMS/commit/65d421b6191a393436bc862ba43ce9f756c43e39


Shannon Deminick 15 Oct 2015, 14:35:20

Just looking into this now but why is it not possible to update a rule ?


Sebastiaan Janssen 15 Oct 2015, 14:41:49

I can't see any code path or any usage that I can reproduce from the backoffice that would lead to an update. Maybe I'm missing something.. Just wanted you to look at it as you were the one who made the change to remove the RuleValue check from entry.Rules.FirstOrDefault(x => x.RuleType == ruleType && x.RuleValue == newRuleValue); and I don't understand why.


Shannon Deminick 15 Oct 2015, 15:06:54

Yup the AddOrUpdateRule would never work unless there was another parameter, i must have been confused at some point ;)

I've update the interface and obsoleted that method in favor of AddRule.

c514ce8da3086698af4c2dc04a5430a3eeba66b0


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.3.0

Due in version: 7.3.1

Sprint: Sprint 1

Story Points:

Cycle: