Hi,
Bit of help or pointers required with this interesting scenario .... for a sports related portal ...
I am currently on my last bit of my portal which is building a search interface to my announcements module. As I aim to have announcements on a daily basis going back over a long period I have added paging to the announcements module (so you don't have a 3 km page length!) but also want a search feature. Easy I thought .... and as I have learnt so much from this site I have quickly built a nice little search feature which runs through the announcements table and pulls out all those items that contain a user's search words in the description field or title.
Great ... well not so really because I now realise that I am not actually incorporating into this any user roles i.e. a search will bring out announcements from modules on tabs that the user does not have a view role for .... so my little search feature is actually bypassing the roles security feature. Here is my query ... the search keywords are passed to the procedure and a simple select statement runs.
CREATE Procedure AnnouncementSearch
(
@Search nvarchar(255)
)
AS
SELECT
CreatedDate,
Title,
MoreLink,
Description
FROM
Announcements
WHERE
Title LIKE '%' + @Search + '%'
OR
Description LIKE '%' + @Search + '%'
ORDER BY
CreatedDate DESC
GO
Now the kneebone is definitely connected to the thigh bone so ... and here comes the hard part ... can anyone explain to me how I modify this to pull out records from the table which appear in modules ... that appear on tabs ... for which the current user has the view role ....
And I have tried very hard with this ..... books out till midnite, error messages and despair, pulling myself together and fighting it again. Have now reached the point where my boyfriend thinks I am now more interested in the portal than him (which is true !) ....
Any pointers gratefully received ..
Laura D