Skip to content

[9.0][IMP][auth_supplier] Remove useless group. Mark as customer. - #442

Merged
pedrobaeza merged 1 commit into
OCA:9.0from
Tecnativa:9.0-auth_supplier-security-remove
Jun 28, 2016
Merged

pedrobaeza merged 1 commit into
OCA:9.0from
Tecnativa:9.0-auth_supplier-security-remove

Conversation

@yajo

@yajo yajo commented Jun 3, 2016

Copy link
Copy Markdown
Member

The whole purpose of this module was to be able to separate a customer and a supplier portals.

Given the status of the upstream implementations of portals, it is not possible to have a supplier portal without portal permissions. Thus, it would be required to make the group this module was creating inherit from base.group_portal, which would give suppliers access to all customers portal. As such, that group becomes useless.

From now on, this distinction should be made with simply checking if user.customer or user.supplier is True. To allow that, I'm implementing what was discussed at #434 (diff).

Tests had to be removed because odoo/odoo#12237 makes the created record to disappear, so there's no way to actually check the created user was created with customer or supplier flag on.

@Tecnativa

@coveralls

coveralls commented Jun 3, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.5%) to 71.991% when pulling 29aa494 on Tecnativa:9.0-auth_supplier-security-remove into 209efac on OCA:9.0.

@pedrobaeza

Copy link
Copy Markdown
Member

👍

1 similar comment
@moylop260

Copy link
Copy Markdown
Contributor

👍

The whole purpose of this module was to be able to separate a customer and a supplier portals.

Given the status of the upstream implementations of portals, it is not possible to have a supplier portal without portal permissions. Thus, it would be required to make the group this module was creating inherit from `base.group_portal`, which would give suppliers access to all customers portal. As such, that group becomes useless.

From now on, this distinction should be made with simply checking if `user.customer` or `user.supplier` is `True`. This means no additional problems since `ir.rule` domains can use the `user` variable. To allow that, I'm implementing what was discussed at OCA#434 (diff).

Tests had to be removed because odoo/odoo#12237 makes the created record to disappear, so there's no way to actually check the created user was created with customer or supplier flag on.
@yajo
yajo force-pushed the 9.0-auth_supplier-security-remove branch from 29aa494 to c5b18d5 Compare June 28, 2016 11:11
@pedrobaeza
pedrobaeza merged commit 11e0442 into OCA:9.0 Jun 28, 2016
@pedrobaeza
pedrobaeza deleted the 9.0-auth_supplier-security-remove branch June 28, 2016 11:46
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (10.0)
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.

4 participants