Role Administration Smartness

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
1/11/2007 1:59:14 PM
Gravatar
Total Posts 80

Role Administration Smartness

To improve usability the role administration module could be smarter.  This applies the the page when you goto role administration, edit a role, and then select "Change Role Members". The drop down list of users could be smart enough to know who is already in the role and not place them in the drop down.  With around 200 users in our db it is not readily apparent.  Use the following SQL procedure query to achieve this (NOTE: only slightly tested):

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        Jesse Englert
-- Create date: 1/11/07
-- Description:    Gets users not in a role
-- =============================================
ALTER PROCEDURE [dbo].[mp_UserRoles_SelectUsersNotInRole]
    -- Add the parameters for the stored procedure here
    @SiteID    int,
    @RoleID int


AS

SELECT  DISTINCT
            ur.UserID,
              u.Email

FROM
            mp_UserRoles ur

JOIN         mp_Users  u
ON             u.UserID = ur.UserID

WHERE
            ur.UserID

NOT IN

(SELECT UserID FROM mp_UserRoles WHERE RoleID = @RoleID)

AND

(u.SiteID = @SiteID)

ORDER BY Email

1/12/2007 11:56:36 AM
Gravatar
Total Posts 18439

Re: Role Administration Smartness

This is now implemented in svn branches/2.x

Thanks,

Joe
You must sign in to post in the forums. This thread is closed to new posts.