Subversion Repositories DevTools

Rev

Rev 141 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 141 Rev 171
Line 52... Line 52...
52
'---------------------------------------
52
'---------------------------------------
53
' THIS IS FOR SYSTEM ADMIN ONLY
53
' THIS IS FOR SYSTEM ADMIN ONLY
54
'---------------------------------------
54
'---------------------------------------
55
QueryString = "SELECT pv.DLOCKED, pv.IS_PATCH FROM PACKAGE_VERSIONS pv WHERE pv.PV_ID = "& parPv_id
55
QueryString = "SELECT pv.DLOCKED, pv.IS_PATCH FROM PACKAGE_VERSIONS pv WHERE pv.PV_ID = "& parPv_id
56
Set rsQry = OraDatabase.DbCreateDynaset( QueryString, cint(0))
56
Set rsQry = OraDatabase.DbCreateDynaset( QueryString, cint(0))
-
 
57
Dim bis_patch: bis_patch = Not IsNull(rsQry("is_patch"))
-
 
58
Dim spkgtype: spkgtype = iif(bis_patch,"patch","package")
-
 
59
 
-
 
60
If objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND (objAccessControl.IsActive("UnlockPatch") OR objAccessControl.IsActive("UnlockPackage"))  Then
57
If IsNull(rsQry("is_patch")) Then
61
  If rsQry("dlocked") = "N" Then
-
 
62
    Call LockPackage ()
-
 
63
    If bis_patch Then
-
 
64
      Response.Redirect ( "_generate_release_notes.asp?rfile=dependencies.asp&pv_id="& parPv_id &"&rtag_id="& parRtag_id )
-
 
65
    else
-
 
66
      Response.Redirect ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
-
 
67
    End If
-
 
68
  Else
58
   Call RaiseMsg(enum_MSG_ERROR, "Only patches can be locked by this function." )
69
    Call RaiseMsg(enum_MSG_ERROR, "Can only lock a " & spkgtype & " that is currently unlocked." )
-
 
70
  End If
59
Else
71
Else
60
   If objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND (objAccessControl.IsActive("UnlockPatch"))  Then
-
 
61
      If rsQry("dlocked") = "N" Then
-
 
62
         Call LockPackage ()
-
 
63
         Response.Redirect ( "_generate_release_notes.asp?rfile=dependencies.asp&pv_id="& parPv_id &"&rtag_id="& parRtag_id )
-
 
64
      Else
-
 
65
         Call RaiseMsg(enum_MSG_ERROR, "Can only lock a patch that is currently unlocked." )
-
 
66
      End If
-
 
67
   Else
-
 
68
      Call RaiseMsg(enum_MSG_ERROR, "You do not have permissions to lock/unlock patches." )
72
  Call RaiseMsg(enum_MSG_ERROR, "You do not have permissions to lock/unlock " & spkgtype & "." )
69
   End If
-
 
70
End If
73
End If
-
 
74
 
71
rsQry.Close
75
rsQry.Close
72
Set rsQry = nothing
76
Set rsQry = nothing
-
 
77
 
73
%>
78
%>
74
 
79
 
75
<!-- DESTRUCTOR ------->
80
<!-- DESTRUCTOR ------->
76
<!--#include file="common/destructor.asp"-->
81
<!--#include file="common/destructor.asp"-->