1 |
<code><span style= "padding:0px; max-width:1000%;" > <span style= "padding:0px; max-width:1000%;" ><span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >public< /span > function <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" >checkPriv< /span ><span style= "padding:0px; max-width:1000%;" >()< /span >< /span >< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" >{< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >try< /span >< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> {< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span > = $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->getModuleName();< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> $method = $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->getMethodName();< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->isFlow)< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> {< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span > = $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->rawModule;< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> $method = $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->rawMethod;< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> }< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" ><br>< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > $beforeValidMethods = <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >array< /span >(< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'user' < /span > => <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >array< /span >(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'deny' < /span >, <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'logout' < /span >),< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'my' < /span > => <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >array< /span >(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'changepassword' < /span >),< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'message' < /span > => <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >array< /span >(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'ajaxgetmessage' < /span >),< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> );< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >(!empty($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->user->modifyPassword) <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > (!isset($beforeValidMethods[$<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span >]) <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >or< /span > !in_array($method, $beforeValidMethods[$<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span >]))) <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > return < /span > print(js:: locate (helper::createLink(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'my' < /span >, <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'changepassword' < /span >)));< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->isOpenMethod($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span >, $method)) <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > return < /span > <span style= "padding:0px; max-width:1000%; color:rgb(14, 156, 229);" > true < /span >;< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >(!$<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->loadModel(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'user' < /span >)->isLogon() <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->server->php_auth_user) $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->user->identifyByPhpAuth();< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >(!$<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->loadModel(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'user' < /span >)->isLogon() <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->cookie->za) $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->user->identifyByCookie();< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" ><br>< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >(isset($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->user))< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> {< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >(in_array($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span >, $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->config->programPriv->waterfall) <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->tab == <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'project' < /span > <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > $method != <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'browse' < /span >) <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > return < /span > <span style= "padding:0px; max-width:1000%; color:rgb(14, 156, 229);" > true < /span >;< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" ><br>< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->user = $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->session->user;< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >(!commonModel::hasPriv($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span >, $method))< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> {< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span > == <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'story' < /span > <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > !empty($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->params[<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'storyType' < /span >]) <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > strpos(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > ",story,requirement," < /span >, <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > ",{$this->app->params['storyType']}," < /span >) !== <span style= "padding:0px; max-width:1000%; color:rgb(14, 156, 229);" > false < /span >) $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span > = $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->params[<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'storyType' < /span >];< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->deny($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span >, $method);< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> }< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> }< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > else < /span >< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> {< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> $uri = $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->app->getURI(<span style= "padding:0px; max-width:1000%; color:rgb(14, 156, 229);" > true < /span >);< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" > if < /span >($<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >module< /span > == <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'message' < /span > <span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >and< /span > $method == <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'ajaxgetmessage' < /span >)< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> {< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> $uri = helper::createLink(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'my' < /span >);< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> }< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> elseif(helper::isAjaxRequest())< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> {< /span >< /code ><code><span style= "padding:0px; max-width:1000%;" > <br> die(json_encode(<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >array< /span >(<span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'result' < /span > => <span style= "padding:0px; max-width:1000%; color:rgb(14, 156, 229);" > false < /span >, <span style= "padding:0px; max-width:1000%; color:rgb(221, 17, 68);" > 'message' < /span > => $<span style= "padding:0px; max-width:1000%; color:rgb(202, 125, 55);" >this< /span >->lang->error->loginTimeout))); <span style= "padding:0px; max-width:1000%; color:rgb(175, 175, 175); font-style:italic;" > // Fix bug #14478.</span></span></code><code><span style="padding:0px; max-width:1000%;"> }</span></code><code><span style="padding:0px; max-width:1000%;"><br></span></code><code><span style="padding:0px; max-width:1000%;"> $referer = helper::safe64Encode($uri);</span></code><code><span style="padding:0px; max-width:1000%;"> <br> die(js::locate(helper::createLink(<span style="padding:0px; max-width:1000%; color:rgb(221, 17, 68);">'user'</span>, <span style="padding:0px; max-width:1000%; color:rgb(221, 17, 68);">'login'</span>, <span style="padding:0px; max-width:1000%; color:rgb(221, 17, 68);">"referer=$referer"</span>)));</span></code><code><span style="padding:0px; max-width:1000%;"> <br> }</span></code><code><span style="padding:0px; max-width:1000%;"> <br> }</span></code><code><span style="padding:0px; max-width:1000%;"> <br> <span style="padding:0px; max-width:1000%; color:rgb(202, 125, 55);">catch</span>(EndResponseException $endResponseException)</span></code><code><span style="padding:0px; max-width:1000%;"> <br> {</span></code><code><span style="padding:0px; max-width:1000%;"> <br> echo $endResponseException->getContent();</span></code><code><span style="padding:0px; max-width:1000%;"> <br> }</span></code><code><span style="padding:0px; max-width:1000%;"> <br> }</span></code>
|