Subversion Repositories DevTools

Rev

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

Rev 5172 Rev 5293
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
Option explicit
-
 
4
Response.Expires = 0   ' always load the page, dont store
-
 
5
%>
-
 
6
<%
-
 
7
'=====================================================
3
'=====================================================
-
 
4
'   _s_lock_package.asp
8
'               System Lock Package
5
'   System Lock Package
9
'=====================================================
6
'=====================================================
-
 
7
Option explicit
-
 
8
Response.Expires = 0   ' always load the page, dont store
10
%>
9
%>
11
<!--#include file="common/conf.asp"-->
10
<!--#include file="common/conf.asp"-->
12
<!--#include file="common/globals.asp"-->
11
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/formating.asp"-->
12
<!--#include file="common/formating.asp"-->
14
<!--#include file="common/qstr.asp"-->
13
<!--#include file="common/qstr.asp"-->
15
<!--#include file="common/common_subs.asp"-->
14
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/common_dbedit.asp"-->
15
<!--#include file="common/common_dbedit.asp"-->
-
 
16
<!--#include file="common/release_changed.asp"-->
17
<%
17
<%
18
'------------ ACCESS CONTROL ------------------
18
'------------ ACCESS CONTROL ------------------
19
%>
19
%>
20
<!--#include file="_access_control_general.asp"-->
20
<!--#include file="_access_control_general.asp"-->
21
<%
21
<%
Line 27... Line 27...
27
parPv_id = QStrPar("pv_id")
27
parPv_id = QStrPar("pv_id")
28
parRtag_id = QStrPar("rtag_id")
28
parRtag_id = QStrPar("rtag_id")
29
'----------------------------------------------
29
'----------------------------------------------
30
%>
30
%>
31
<%
31
<%
32
Sub LockPackage ()
32
Sub LockPackage (bIsPatch)
33
 
33
 
34
   OraDatabase.Parameters.Add "PV_ID",   Request("pv_id"),        ORAPARM_INPUT, ORATYPE_NUMBER
34
   OraDatabase.Parameters.Add "PV_ID",   Request("pv_id"),        ORAPARM_INPUT, ORATYPE_NUMBER
35
   OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
35
   OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
36
 
36
 
37
   objEH.TryORA ( OraSession )
37
   objEH.TryORA ( OraSession )
Line 42... Line 42...
42
 
42
 
43
   objEH.CatchORA ( OraSession )
43
   objEH.CatchORA ( OraSession )
44
 
44
 
45
   OraDatabase.Parameters.Remove "PV_ID"
45
   OraDatabase.Parameters.Remove "PV_ID"
46
   OraDatabase.Parameters.Remove "USER_ID"
46
   OraDatabase.Parameters.Remove "USER_ID"
-
 
47
 
-
 
48
   If (objEH.LastOraFailed = FALSE) AND (bIsPatch) Then
-
 
49
        ' If this is a patch, then make the package, in dpkg_archive, writable
-
 
50
        ' This is UGLY
-
 
51
        '
-
 
52
        Dim objRC: Set objRC = New ReleaseChanged
-
 
53
        Call objRC.MakeReadOnly(parRtag_id, parPv_id )
-
 
54
 
-
 
55
   End If
47
End Sub
56
End Sub
48
 
57
 
49
%>
58
%>
50
<%
59
<%
51
'Process submition
60
'Process submition
Line 64... Line 73...
64
  bcan_unlock = canActionControlInProject("EditCriticalInfoForLockedPackage")
73
  bcan_unlock = canActionControlInProject("EditCriticalInfoForLockedPackage")
65
End If
74
End If
66
 
75
 
67
If bcan_unlock Then
76
If bcan_unlock Then
68
  If rsQry("dlocked") = "N" Then
77
  If rsQry("dlocked") = "N" Then
69
    Call LockPackage ()
78
    Call LockPackage (bis_patch)
70
      Response.Redirect ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
79
    Response.Redirect ( "fixed_issues.asp?rtag_id="& parRtag_id &"&pv_id="& parPv_id)
71
  Else
80
  Else
72
    Call RaiseMsg(enum_MSG_ERROR, "Can only lock a " & spkgtype & " that is currently unlocked." )
81
    Call RaiseMsg(enum_MSG_ERROR, "Can only lock a " & spkgtype & " that is currently unlocked." )
73
  End If
82
  End If
74
Else
83
Else
75
  Call RaiseMsg(enum_MSG_ERROR, "You do not have permissions to lock/unlock " & spkgtype & "." )
84
  Call RaiseMsg(enum_MSG_ERROR, "You do not have permissions to lock/unlock " & spkgtype & "." )