You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dashboard.rst 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. =========
  2. Dashboard
  3. =========
  4. The dashboard is the backend interface for managing the store. That includes the
  5. product catalogue, orders and stock, offers etc. It is intended as a
  6. complete replacement of the Django admin interface.
  7. The app itself only contains a view that serves as a kind of homepage, and
  8. some logic for managing the navigation (in ``nav.py``). There's several sub-apps
  9. that are responsible for managing the different parts of the Oscar store.
  10. Permission-based dashboard
  11. --------------------------
  12. Staff users (users with ``is_staff==True``) get access to all views in the
  13. dashboard. To better support Oscar's use for marketplace scenarios, the
  14. permission-based dashboard has been introduced. If a non-staff user has
  15. the ``partner.dashboard_access`` permission set, they are given access to a subset
  16. of views, and their access to products and orders is limited.
  17. :class:`~oscar.apps.partner.abstract_models.AbstractPartner` instances
  18. have a :attr:`~oscar.apps.partner.abstract_models.AbstractPartner.users` field.
  19. Prior to Oscar 0.6, this field was not used. Since Oscar 0.6, it is used solely
  20. for modelling dashboard access.
  21. If a non-staff user with the ``partner.dashboard_access`` permission is in
  22. :attr:`~oscar.apps.partner.abstract_models.AbstractPartner.users`, they can:
  23. * Create products. It is enforced that at least one stock record's partner has
  24. the current user in ``users``.
  25. * Update products. At least one stock record must have the user in the stock
  26. record's partner's ``users``.
  27. * Delete and list products. Limited to products the user is allowed to update.
  28. * Managing orders. Similar to products, a user get access if one of an order's
  29. lines is associated with a matching partner.
  30. For many marketplace scenarios, it will make sense to ensure at checkout that
  31. a basket only contains lines from one partner.
  32. Please note that the dashboard currently ignores any other permissions,
  33. including `Django's default permissions`_.
  34. .. note::
  35. The permission-based dashboard currently does not support parent or child
  36. products. Supporting this requires a modelling change. If you require this,
  37. please get in touch so we can first learn about your use case.
  38. .. _Django's default permissions: https://docs.djangoproject.com/en/stable/topics/auth/default/#default-permissions
  39. Abstract models
  40. ---------------
  41. None.
  42. Views
  43. -----
  44. .. automodule:: oscar.apps.dashboard.views
  45. :members: