Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -68,6 +68,7 @@ class System
|
|||||||
'size_log_file' => 5000000,
|
'size_log_file' => 5000000,
|
||||||
'number_log_file' => 5,
|
'number_log_file' => 5,
|
||||||
'ie_cookie_lifetime' => 1,
|
'ie_cookie_lifetime' => 1,
|
||||||
|
'safari_cookie_lifetime' => 1,
|
||||||
'error_reporting' => "",
|
'error_reporting' => "",
|
||||||
'display_errors' => 'On'
|
'display_errors' => 'On'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ class OauthAccessTokens extends BaseOauthAccessTokens
|
|||||||
$criteria->addSelectColumn(OauthClientsPeer::CLIENT_DESCRIPTION);
|
$criteria->addSelectColumn(OauthClientsPeer::CLIENT_DESCRIPTION);
|
||||||
|
|
||||||
$criteria->addJoin(OauthAccessTokensPeer::CLIENT_ID, OauthClientsPeer::CLIENT_ID, Criteria::LEFT_JOIN);
|
$criteria->addJoin(OauthAccessTokensPeer::CLIENT_ID, OauthClientsPeer::CLIENT_ID, Criteria::LEFT_JOIN);
|
||||||
|
$criteria->add(OauthAccessTokensPeer::EXPIRES, date('Y-m-d H:i:s'), Criteria::GREATER_THAN);
|
||||||
|
|
||||||
if ($arrayFilterData && isset($arrayFilterData["USER_ID"]) && $arrayFilterData["USER_ID"] != "") {
|
if ($arrayFilterData && isset($arrayFilterData["USER_ID"]) && $arrayFilterData["USER_ID"] != "") {
|
||||||
$criteria->add(OauthAccessTokensPeer::USER_ID, $arrayFilterData["USER_ID"], Criteria::EQUAL);
|
$criteria->add(OauthAccessTokensPeer::USER_ID, $arrayFilterData["USER_ID"], Criteria::EQUAL);
|
||||||
|
|||||||
@@ -151,6 +151,8 @@ class OauthClients extends BaseOauthClients
|
|||||||
$criteria->addSelectColumn(OauthClientsPeer::REDIRECT_URI);
|
$criteria->addSelectColumn(OauthClientsPeer::REDIRECT_URI);
|
||||||
$criteria->addSelectColumn(OauthClientsPeer::USR_UID);
|
$criteria->addSelectColumn(OauthClientsPeer::USR_UID);
|
||||||
|
|
||||||
|
$criteria->add(OauthClientsPeer::CLIENT_ID, 'x-pm-local-client', Criteria::NOT_EQUAL);
|
||||||
|
|
||||||
if ($arrayFilterData && isset($arrayFilterData["USR_UID"]) && $arrayFilterData["USR_UID"] != "") {
|
if ($arrayFilterData && isset($arrayFilterData["USR_UID"]) && $arrayFilterData["USR_UID"] != "") {
|
||||||
$criteria->add(OauthClientsPeer::USR_UID, $arrayFilterData["USR_UID"], Criteria::EQUAL);
|
$criteria->add(OauthClientsPeer::USR_UID, $arrayFilterData["USR_UID"], Criteria::EQUAL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -895,7 +895,7 @@ class Installer extends Controller
|
|||||||
'%s://%s/sys%s/%s/%s/oauth2/grant',
|
'%s://%s/sys%s/%s/%s/oauth2/grant',
|
||||||
$http,
|
$http,
|
||||||
$host,
|
$host,
|
||||||
$wf,
|
$workspace,
|
||||||
$langUri,
|
$langUri,
|
||||||
$skinUri
|
$skinUri
|
||||||
);
|
);
|
||||||
|
|||||||
28
workflow/engine/methods/oauth2/applications.php
Normal file
28
workflow/engine/methods/oauth2/applications.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* main.php Cases List main processor
|
||||||
|
*
|
||||||
|
* ProcessMaker Open Source Edition
|
||||||
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$G_PUBLISH->AddContent('view', 'oauth2/applicationsLoad');
|
||||||
|
G::RenderPage('publish');
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@ $config = array();
|
|||||||
$config["pageSize"] = 20;
|
$config["pageSize"] = 20;
|
||||||
|
|
||||||
$headPublisher = &headPublisher::getSingleton();
|
$headPublisher = &headPublisher::getSingleton();
|
||||||
$headPublisher->addContent("oauth2" . PATH_SEP . "clientSetup"); //Adding a HTML file .html
|
//$headPublisher->addContent("oauth2" . PATH_SEP . "clientSetup"); //Adding a HTML file .html
|
||||||
$headPublisher->addExtJsScript("oauth2" . PATH_SEP . "clientSetup", false); //Adding a JavaScript file .js
|
$headPublisher->addExtJsScript("oauth2" . PATH_SEP . "clientSetup", false); //Adding a JavaScript file .js
|
||||||
$headPublisher->assign("CONFIG", $config);
|
$headPublisher->assign("CONFIG", $config);
|
||||||
$headPublisher->assign("CREATE_CLIENT", (isset($_GET["create_app"]))? 1 : 0);
|
$headPublisher->assign("CREATE_CLIENT", (isset($_GET["create_app"]))? 1 : 0);
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ accessTokenSetup.application = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var btn2 = new Ext.Button({
|
var btn2 = new Ext.Button({
|
||||||
text: "Delete",
|
text: "Remove Access",
|
||||||
iconCls: "button_menu_ext ss_sprite ss_cross",
|
iconCls: "button_menu_ext ss_sprite ss_cross",
|
||||||
renderTo: id2,
|
renderTo: id2,
|
||||||
|
|
||||||
@@ -342,11 +342,11 @@ accessTokenSetup.application = {
|
|||||||
sm.selectRow(rowIndex, true);
|
sm.selectRow(rowIndex, true);
|
||||||
|
|
||||||
var record = grdpnlMain.getSelectionModel().getSelected();
|
var record = grdpnlMain.getSelectionModel().getSelected();
|
||||||
|
console.log(record);
|
||||||
if (typeof(record) != "undefined") {
|
if (typeof(record) != "undefined") {
|
||||||
Ext.MessageBox.confirm(
|
Ext.MessageBox.confirm(
|
||||||
_("ID_CONFIRM"),
|
_("ID_CONFIRM"),
|
||||||
"Do you want to delete selected Application?",
|
"Are you sure to remove access to the <b>"+record.get("CLIENT_NAME")+"</b> application?",
|
||||||
function (btn)
|
function (btn)
|
||||||
{
|
{
|
||||||
if (btn == "yes") {
|
if (btn == "yes") {
|
||||||
@@ -394,13 +394,13 @@ accessTokenSetup.application = {
|
|||||||
//style: "margin: 0 auto 0 auto;",
|
//style: "margin: 0 auto 0 auto;",
|
||||||
//width: 550,
|
//width: 550,
|
||||||
//height: 450,
|
//height: 450,
|
||||||
title: "<div><div style=\"float: left;\">" + "Applications" + "</div><div id=\"divClientSetup\" style=\"float: right;\"></div><div style=\"clear: both; height: 0; line-height:0; font-size: 0;\"></div></div>",
|
title: "<div><div style=\"float: left;\">" + "User Applications" + "</div><div id=\"divClientSetup\" style=\"float: right;\"></div><div style=\"clear: both; height: 0; line-height:0; font-size: 0;\"></div></div>",
|
||||||
border: false,
|
border: false,
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
afterrender: function (grid)
|
afterrender: function (grid)
|
||||||
{
|
{
|
||||||
var btn = new Ext.Button({
|
/*ar btn = new Ext.Button({
|
||||||
text: " " + "Setup My Applications",
|
text: " " + "Setup My Applications",
|
||||||
iconCls: "button_menu_ext ss_sprite ss_cog",
|
iconCls: "button_menu_ext ss_sprite ss_cog",
|
||||||
renderTo: "divClientSetup",
|
renderTo: "divClientSetup",
|
||||||
@@ -409,7 +409,7 @@ accessTokenSetup.application = {
|
|||||||
{
|
{
|
||||||
location.href = "clientSetup";
|
location.href = "clientSetup";
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
30
workflow/engine/templates/oauth2/applicationsLoad.php
Normal file
30
workflow/engine/templates/oauth2/applicationsLoad.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<body onresize="autoResizeScreen()" onload="autoResizeScreen()">
|
||||||
|
<style type="text/css">
|
||||||
|
*html body {
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<iframe name="adminFrame" id="adminFrame" src ="clientSetup" width="99%" height="768" frameborder="0">
|
||||||
|
<p>Your browser does not support iframes.</p>
|
||||||
|
</iframe>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
oClientWinSize = getClientWindowSize();
|
||||||
|
if ( document.getElementById('pm_submenu') )
|
||||||
|
document.getElementById('pm_submenu').style.display = 'none';
|
||||||
|
document.documentElement.style.overflowY = 'hidden';
|
||||||
|
|
||||||
|
function autoResizeScreen() {
|
||||||
|
oCasesFrame = document.getElementById('adminFrame');
|
||||||
|
oClientWinSize = getClientWindowSize();
|
||||||
|
height = oClientWinSize.height-90;
|
||||||
|
oCasesFrame.style.height = height;
|
||||||
|
oCasesSubFrame = oCasesFrame.contentWindow.document.getElementById('setup-frame');
|
||||||
|
|
||||||
|
if(oCasesSubFrame)
|
||||||
|
oCasesSubFrame.style.height = height-5;
|
||||||
|
else
|
||||||
|
setTimeout('autoResizeScreen()', 2000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
@@ -137,7 +137,7 @@ clientSetup.application = {
|
|||||||
winData.setTitle("Edit Application");
|
winData.setTitle("Edit Application");
|
||||||
winData.show();
|
winData.show();
|
||||||
|
|
||||||
Ext.getCmp("btnSubmit").btnEl.dom.innerHTML = "Edit Application";
|
Ext.getCmp("btnSubmit").btnEl.dom.innerHTML = "Save Changes";
|
||||||
|
|
||||||
Ext.getCmp("txtName").allowBlank = false;
|
Ext.getCmp("txtName").allowBlank = false;
|
||||||
}
|
}
|
||||||
@@ -336,8 +336,8 @@ clientSetup.application = {
|
|||||||
id: "txtRedirectUri",
|
id: "txtRedirectUri",
|
||||||
name: "txtRedirectUri",
|
name: "txtRedirectUri",
|
||||||
|
|
||||||
fieldLabel: "Callback URL",
|
fieldLabel: "Callback URL"/*,
|
||||||
vtype: "url"
|
vtype: "url"*/
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: "label",
|
xtype: "label",
|
||||||
@@ -353,7 +353,7 @@ clientSetup.application = {
|
|||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
id: "btnSubmit",
|
id: "btnSubmit",
|
||||||
//text: "",
|
text: "Save",
|
||||||
handler: function ()
|
handler: function ()
|
||||||
{
|
{
|
||||||
if (Ext.getCmp("frmOauthClient").getForm().isValid()) {
|
if (Ext.getCmp("frmOauthClient").getForm().isValid()) {
|
||||||
@@ -634,22 +634,22 @@ clientSetup.application = {
|
|||||||
//style: "margin: 0 auto 0 auto;",
|
//style: "margin: 0 auto 0 auto;",
|
||||||
//width: 550,
|
//width: 550,
|
||||||
//height: 450,
|
//height: 450,
|
||||||
title: "<div><div style=\"float: left;\">" + "My Applications" + "</div><div id=\"divAccessTokenSetup\" style=\"float: right;\"></div><div style=\"clear: both; height: 0; line-height:0; font-size: 0;\"></div></div>",
|
title: "<div><div style=\"float: left;\">" + "ProcessMaker Dev Tools / User Applications" + "</div><div id=\"divAccessTokenSetup\" style=\"float: right;\"></div><div style=\"clear: both; height: 0; line-height:0; font-size: 0;\"></div></div>",
|
||||||
border: false,
|
border: false,
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
afterrender: function (grid)
|
afterrender: function (grid)
|
||||||
{
|
{
|
||||||
var btn = new Ext.Button({
|
// var btn = new Ext.Button({
|
||||||
text: " " + "Applications",
|
// text: " " + "Applications",
|
||||||
iconCls: "button_menu_ext ss_sprite ss_arrow_left",
|
// iconCls: "button_menu_ext ss_sprite ss_arrow_left",
|
||||||
renderTo: "divAccessTokenSetup",
|
// renderTo: "divAccessTokenSetup",
|
||||||
|
//
|
||||||
handler: function ()
|
// handler: function ()
|
||||||
{
|
// {
|
||||||
location.href = "accessTokenSetup";
|
// location.href = "accessTokenSetup";
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
rowdblclick: function (grid, rowIndex, evt)
|
rowdblclick: function (grid, rowIndex, evt)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user