|
@@ -9,7 +9,7 @@ from rapid.registry import Action
|
|
|
from rapid.models import Application, Profile
|
|
|
from rapid.forms import ManageUsers
|
|
|
|
|
|
-import rapid
|
|
|
+import rapid.views
|
|
|
from rapid import permissions
|
|
|
|
|
|
def _can_manage_users(request):
|
|
@@ -17,11 +17,11 @@ def _can_manage_users(request):
|
|
|
return None
|
|
|
return request.user.application.managed_applications.profile_set
|
|
|
|
|
|
-urlpatterns = rapid.register_model(Application, 'aplicacao',
|
|
|
+urlpatterns = views.register_model(Application, 'aplicacao',
|
|
|
write_set=permissions.to_admins(Application), read_set=permissions.to_all(Application)) +\
|
|
|
- rapid.register_model(Profile, write_set=permissions.to_admins(Profile), read_set=permissions.to_staff(Profile)) +\
|
|
|
- rapid.register_instance_form(Profile, 'manage_users', u'Gerenciar Usuários',
|
|
|
+ views.register_model(Profile, write_set=permissions.to_admins(Profile), read_set=permissions.to_staff(Profile)) +\
|
|
|
+ views.register_instance_form(Profile, 'manage_users', u'Gerenciar Usuários',
|
|
|
ManageUsers, _can_manage_users, "fa-users",
|
|
|
Action.Visibility.list) +\
|
|
|
- rapid.register_simple_select(User, ['username'], permissions.to_staff(User), 'usuario')
|
|
|
+ views.register_simple_select(User, ['username'], permissions.to_staff(User), 'usuario')
|
|
|
|