Sybren A. Stüvel
cd417bb9db
Orgs: styling tweaks to make member list a bit nicer
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
65518f2208
Spaces to tabs
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
30902bc9cd
Orgs: made the admin picker a bit nicer to work with
...
Also it now asks for a confirmation before transferring admin-ship to
the new admin user.
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
37b1a6e0c1
Orgs: added labels to organization form
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
f1edb901d1
Orgs: allow setting org admin via web interface / PATCH request
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
a5d11ec31b
Refactored user search as JQuery plugin
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
2bf95223b7
Orgs: layout tweaks
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
08294e2f14
Orgs: allow admins to set seat count and org_roles
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
1c9f425a40
Orgs: use flask_login.current_user to avoid calling current_user() all the time
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
4116357447
Orgs: some small fixes, mostly for stability / corner cases
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
e9cb235640
Added web interface for organizations.
...
It looks like crap, but it allows you to edit the details and the members.
2017-08-24 14:28:18 +02:00
Sybren A. Stüvel
64eab850c5
Orgs: pillar admins can always edit an organization
2017-08-24 14:28:17 +02:00
Sybren A. Stüvel
c6eebc4eae
Orgs: allow setting location field by PATCH
2017-08-24 14:28:17 +02:00
Sybren A. Stüvel
1bd6e07fe2
Orgs: Allow adding individual known users by user ID.
...
This is used for the selection by user search.
2017-08-24 14:28:17 +02:00
Sybren A. Stüvel
1ad13d048f
Some extra type safety checks
2017-08-24 14:28:17 +02:00
Sybren A. Stüvel
cfde720b1d
Orgs: PATCH op to batch-add emails as members now strip()s emails
...
It also refuses to add empty emails.
2017-08-24 14:28:11 +02:00
Sybren A. Stüvel
5d17d892a4
Orgs: Use current_user() in PATCH handler
2017-08-24 14:28:02 +02:00
Sybren A. Stüvel
40172bf8b5
Orgs: Use create-organization capability to control access
...
This is more explicit and future-proof than checking for admin cap.
2017-08-24 14:27:52 +02:00
Sybren A. Stüvel
72404d0fd9
Handle registration of previously unknown organization members.
...
When a new user is created, two things happen:
- before inserting into MongoDB, the organizational roles are given
- after inserting, the organizations are updated to move the user from
`unknown_members` to `members`.
2017-08-24 14:26:19 +02:00
Sybren A. Stüvel
b53d485960
Added access control to organizations Eve endpoints
2017-08-24 14:26:19 +02:00
Sybren A. Stüvel
cf51d1a280
Added utility function current_user() that acts like flask_login.current_user
...
This actually returns an AnonymousUser object, instead of None, when the
user is not logged in.
For compatibility with existing code, this function doesn't set
g.current_user to that AnonymousUser instance. We may decide to do this
later.
2017-08-24 14:26:19 +02:00
Sybren A. Stüvel
efc1890871
Added PATCH support for organizations
...
With a PATCH request you can now:
- assign users,
- remove a user,
- edit the name, description, and website fields.
Only the organization admin user can do this.
2017-08-24 14:26:19 +02:00
Sybren A. Stüvel
93d534fe94
Added Organization Manager.
...
This is a Flamenco/Attract-style Manager object that's instantiated by
the PillarApplication. It can create Organizations and assign/remove
users.
Also I updated the Organization schema to reflect the currently desired
design.
NOTA BENE: this does not include any security/authorisation checks on Eve's
organizations collection.
2017-08-24 14:25:52 +02:00
Sybren A. Stüvel
87afbc52f6
Updated do_badger to take an optional set of roles.
...
The 'role' parameter now must be passed as keyword arg instead of
positional arg. Either 'role' or 'roles' must be given.
2017-08-23 08:59:23 +02:00
Francesco Siddi
15de24214a
Decouple upload_and_process from stream_to_storage
...
The stream_to_storage function is still quite large, and this is a first step at refactoring it. stream_to_storage can be used for files that are uploaded on the server without the /stream endpoint (for example downloaded from a link).
2017-08-22 13:26:12 +02:00
Sybren A. Stüvel
2b09711eb0
Load user capabilities from Pillar config and allow extensions to extend.
...
Default caps can be overridden using the USER_CAPABILITIES name in
config_local.py. These can be extended by Pillar Extensions.
2017-08-22 11:31:17 +02:00
Sybren A. Stüvel
566f2a4835
Late-initialise CLI user & late-import UserClass class
...
This may fix some unit tests issues.
2017-08-22 09:41:38 +02:00
Sybren A. Stüvel
575a7ed1a7
Introduced role-based capability system.
...
It's still rather limited and hard-coded, but it works.
2017-08-18 14:47:42 +02:00
Sybren A. Stüvel
566a23d3b6
Unified user representation for web and API calls
...
Both approaches now use a pillar.auth.UserClass instance. g.current_user
is now always set to that instance, even for web entry points.
This UserClass instance can still be keyed like the old dict, but this is
for temporary compatibility and shouldn't be relied on in new or touched
code.
2017-08-18 13:19:34 +02:00
Sybren A. Stüvel
6473ad3de7
Allow iframes that contain content from our Google Cloud storage.
2017-08-17 12:59:42 +02:00
Francesco Siddi
6285e81883
Add course and workshop project types to admin interface
2017-07-27 17:18:20 +02:00
Francesco Siddi
4c896ae6b7
Introducing new icons
...
graduation-cap and lightbulb thanks to @venomgfx.
2017-07-26 16:55:42 +02:00
Francesco Siddi
b3aee6c8bc
Introducing new types of projects
...
We reorganized training projects into courses and workshops. Project types should be expandable by extensions to avoid this kind of changes.
2017-07-26 16:55:02 +02:00
Francesco Siddi
e18ed79c7b
Move training and open-projects to blender-cloud repo
2017-07-26 16:52:45 +02:00
Francesco Siddi
9aa73c5306
Moved project index_collection to blender-cloud repo
2017-07-26 16:52:05 +02:00
Francesco Siddi
e430b2b9a1
Update url_for from main.join to cloud.join
...
This text should be moved to Blender Cloud.
2017-07-16 01:00:24 +02:00
Francesco Siddi
502e494083
Clean up local login
...
Use generate_and_store_token and get_local_user directly instead of the /make-token endpoint.
2017-07-14 21:41:40 +02:00
Francesco Siddi
e752a5dc87
On new project creation, use the backend storage set in config
2017-07-14 12:04:24 +02:00
Francesco Siddi
5ec76f8801
Remove Blender Cloud specific pages
...
They are now available in the blender-cloud repository. This is an effort to make Pillar a generic package.
2017-07-13 18:24:43 +02:00
Sybren A. Stüvel
7f336cb47c
Merge branch 'production'
2017-07-13 17:31:28 +02:00
Sybren A. Stüvel
bd13d89817
Added permission check to DELETE of nodes.
2017-07-13 17:29:46 +02:00
Pablo Vazquez
8a8f654657
Project sidebar: tweak to active item state
2017-07-13 15:44:00 +02:00
Francesco Siddi
b88594958d
Convert spaces to tabs for jade files
2017-07-13 12:36:06 +02:00
Francesco Siddi
3d1757476a
Support for OpenGraph and Twitter cards in blogposts
2017-07-13 12:36:06 +02:00
Pablo Vazquez
c9af6fe44f
Services: Re-design and welcome Flamenco!
...
Thanks to @fsiddi for feedback
2017-07-11 18:44:30 +02:00
Pablo Vazquez
5c21443f9b
Homepage: Hide In Production (for now... :
2017-07-11 18:44:30 +02:00
Pablo Vazquez
758df5bc26
Gulp: Fix crashing after error (Plumber not plumbing)
2017-07-11 18:44:30 +02:00
Sybren A. Stüvel
4c273671e4
CLI index_users_rebuild() made parallel
2017-07-11 15:29:17 +02:00
Sybren A. Stüvel
f3e79bcfb5
Formatting
2017-07-11 12:56:40 +02:00
Sybren A. Stüvel
b04abef20f
Also push user to Algolia when its role changes through the badger
...
This may cause some superfluous pushes, though.
2017-07-11 12:56:32 +02:00