from django.conf.urls import patterns, include, url

urlpatterns = patterns('UserManage.views',
    url(r'^login/$', 'user.LoginUser', name='loginurl'),
    url(r'^logout/$', 'user.LogoutUser', name='logouturl'),
    #url(r'^signup/$', 'user.SignUp', name='signupurl'),

    url(r'^user/add/$', 'user.AddUser', name='adduserurl'),
    #url(r'^user/addadmin/$', 'user.AddAdmin', name='addadminurl'),
    url(r'^user/removes/rm/$', 'user.RemoveUsers', name='removesusersurl'),
    url(r'^user/removes/ipid/(?P<ID>\d+)/$', 'user.RemoveUsers_ByIpid', name='removesusersbyipid'),
    url(r'^user/removes/ipidexp/(?P<ID>\d+)/$', 'user.ExpUsers_ByIpid', name='expusersbyipid'),
    url(r'^user/addxls/$', 'user.XLSFileUser', name='addxlsuserurl'),
    url(r'^user/list/$', 'user.ListUser', name='listuserurl'),
    #url(r'^user/listnew/$', 'user.ListNewUser', name='listnewuserurl'),
    url(r'^user/edit/(?P<ID>\d+)/$', 'user.EditUser', name='edituserurl'),
    url(r'^user/delete/(?P<ID>\d+)/$', 'user.DeleteUser', name='deleteuserurl'),
    url(r'^user/xlserror/$', 'user.AddXlsError', name='addxlserror'),

    url(r'^user/changepwd/$', 'user.ChangePassword', name='changepasswordurl'),
    url(r'^user/resetpwd/(?P<ID>\d+)/$', 'user.ResetPassword', name='resetpasswordurl'),
    #url(r'^user/changeinfo/$', 'user.ChangInfo', name='changeuserurl'),

    url(r'^role/add/$', 'role.AddRole', name='addroleurl'),
    url(r'^role/list/$', 'role.ListRole', name='listroleurl'),
    url(r'^role/permission/$', 'role.ListPRole', name='listrolepermission'),
    url(r'^role/edit/(?P<ID>\d+)/$', 'role.EditRole', name='editroleurl'),
    url(r'^role/delete/(?P<ID>\d+)/$', 'role.DeleteRole', name='deleteroleurl'),

    url(r'^group/add/$', 'group.AddGroup', name='addgroupurl'),
    url(r'^group/addxls/$', 'group.XLSFileGroup', name='addxlsgroupurl'),
    url(r'^group/removes/$', 'group.RemoveGroups', name='removegroupsurl'),
    url(r'^group/list/$', 'group.ListGroup', name='listgroupurl'),
    url(r'^group/edit/(?P<ID>\d+)/$', 'group.EditGroup', name='editgroupurl'),
    url(r'^group/delete/(?P<ID>\d+)/$', 'group.DeleteGroup', name='deletegroupurl'),

    url(r'^permission/deny/$', 'permission.NoPermission', name='permissiondenyurl'),

    url(r'^permission/add/$', 'permission.AddPermission', name='addpermissionurl'),
    url(r'^permission/list/$', 'permission.ListPermission', name='listpermissionurl'),
    url(r'^permission/edit/(?P<ID>\d+)/$', 'permission.EditPermission', name='editpermissionurl'),
    url(r'^permission/delete/(?P<ID>\d+)/$', 'permission.DeletePermission', name='deletepermissionurl'),
)
