Ron S
|
| Posted: 03/03/2003, 8:41 PM |
|
I want to know how to create a Custom Login routine in CCS using ASP on
IIS.
I am trying to integrate a CCS App with an existing Member
registration/login system and use that.
Most of the examples on the codecharge.com site are for CC - I could not
find any examples for CCS.
If some one has an example or can point me to one - it would be great.
Thanks
Ron S
|
|
|
 |
Norbert
|
| Posted: 03/04/2003, 1:25 AM |
|
"Ron S" <wizzerd1024@yahoo.com> wrote in message
news:b41aqj$m8n$1@news.codecharge.com...
> I want to know how to create a Custom Login routine in CCS using ASP on
> IIS.
> I am trying to integrate a CCS App with an existing Member
> registration/login system and use that.
> Most of the examples on the codecharge.com site are for CC - I could not
> find any examples for CCS.
> If some one has an example or can point me to one - it would be great.
>
> Thanks
>
> Ron S
It is possible and works pretty well, I am currently working on project that
will be based on that type of security and solved that issue already for
Portal example.
I did it some time ago and can't guarantee that will work but at least will
give you a hint.
If you want to implement your own solution you will need to modify
common.asp and function: CCSecurityAccessCheck(GroupsAccess).
I do it like that:
To retrieve curently logged user I use the following construction on top of
common.asp file
Dim sDomainLogonName
sDomainLogonName = UCASE(Request.ServerVariables("LOGON_USER"))
I also modified the function below
'CCSecurityAccessCheck @0-8A7701BE
Function CCSecurityAccessCheck(GroupsAccess)
Dim ErrorType
Dim GroupID
ErrorType = "success"
'********************************
CheckDomainUserWithDatabase()
'*******************************
If IsEmpty(CCGetUserID()) Then
ErrorType = "notLogged"
Else
GroupID = CCGetGroupID()
If IsEmpty(GroupID) Then
ErrorType = "groupIDNotSet"
Else
If NOT CCUserInGroups(GroupID, GroupsAccess) Then
ErrorType = "illegalGroup"
End If
End If
End If
CCSecurityAccessCheck = ErrorType
End Function
And created that function
Function CheckDomainUserWithDatabase()
Dim Result
Dim SQL
Dim RecordSet
Dim Connection
Dim userid, groupid
Set Connection = New clsDBinternet
Connection.Open
SQL = "SELECT [user_id], [group_id] FROM [users] WHERE [user_login]='"
& Replace(sDomainLogonName, "'\", "\\")& "'" AND [DomainLogon]=1
Set RecordSet = Connection.Execute(SQL)
Result = NOT RecordSet.EOF
If Result Then
userid=Session("PortalUserID") = RecordSet("user_id")
groupid=Session("PortalGroupID") = RecordSet("group_id")
End If
'some debuging
'response.write "<script>alert('sDom= " & Replace(sDomainLogonName, "\",
"\\") & " userid=" & userid & " groupid =" & groupid & "');</script>"
RecordSet.Close
Set RecordSet = Nothing
Connection.Close
Set Connection = Nothing
CheckDomainUserWithDatabase = Result
End Function
Hope could help you
Norbert
|
|
|
 |
Norbert
|
| Posted: 03/04/2003, 3:01 AM |
|
Please note that it is not fully working example (I am sure right now),
but version at something like 80% stage
I don't have final version available to send. I can have it but in a few
days. I am out of office.
As far as I remember my work thouse lines were not working fine,
If Result Then
==> userid=Session("PortalUserID") = RecordSet("user_id")
==> groupid=Session("PortalGroupID") = RecordSet("group_id")
End If
but finally I solved that.
/Norbert
|
|
|
 |
Ron S
|
| Posted: 03/05/2003, 9:43 PM |
|
Thanks, Norbert - for the reply. I will try and let you know if it works.
- Ron S
"Norbert" <nneubauer@nospam.zabki.net.pl> wrote in message
news:b4211r$72s$1@news.codecharge.com...
> Please note that it is not fully working example (I am sure right now),
> but version at something like 80% stage
> I don't have final version available to send. I can have it but in a few
> days. I am out of office.
>
> As far as I remember my work thouse lines were not working fine,
> If Result Then
> ==> userid=Session("PortalUserID") = RecordSet("user_id")
> ==> groupid=Session("PortalGroupID") = RecordSet("group_id")
> End If
>
> but finally I solved that.
>
> /Norbert
>
>
|
|
|
 |
|