10000 Remove revert to live feature by Aiky30 · Pull Request #6454 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

Remove revert to live feature #6454

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

Merged

Conversation

Aiky30
Copy link
Contributor
@Aiky30 Aiky30 commented Jul 23, 2018

Summary

Remove revert to live from toolbar
Remove tests for this feature
Remove revert_to_live method on Page model

Documentation checklist

  • I have updated CHANGELOG.txt if appropriate
  • I have updated the release notes document if appropriate, with:
    • general notes
    • bug-fixes
    • improvements/new features
    • backwards-incompatible changes
    • required upgrade steps
    • names of contributors
  • I have updated other documentation
  • I have added my name to the AUTHORS file
  • This PR's documentation has been approved by Daniele Procida

@coveralls
Copy link
coveralls commented Jul 23, 2018

Coverage Status

Coverage remained the same at 78.189% when pulling cada302 on Aiky30:remove-revert-to-live-feature into cb19c60 on divio:release/4.0.x.

@czpython czpython self-assigned this Jul 23, 2018
@czpython czpython added this to the 4.0.0 milestone Jul 23, 2018
return False

site = self.get_site(request)
has_perm = page_permissions.user_can_revert_page_to_live(
Copy link
Contributor

Choose a reason for hiding this comment

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

when doing these kinds of removals, make sure to also remove the function being called (if not used anywhere else). So in this case remove user_can_revert_page_to_live and if there's a permission attached to it, also remove that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@czpython I have done as you requested. In this instance the permission is also used elsewhere in the file so I believe that the permission should stay. Let me know if I've misunderstood. Ta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just spotted and removed a redundant new line. Will need to let it build and pass. It was a pass before this change so I don't see any issues with it going ahead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Which permission are you referring to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@czpython you mentioned "if there's a permission attached to it, also remove that.". There was a decorator with a permission label which is used in other parts. I figured you were referring to that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-@auth_permission_required('change_page')

@czpython czpython merged commit 1d78946 into django-cms:release/4.0.x Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0