bump x 1
On Dec 27, 9:59 am, RhythmicDevil wrote:
> Hi all,
> I am trying to get validation working for my application but I am
> getting some weirdness. I have setup a custom RBAC implementation
> using MongoDB and Ichikaway's datasource.
>
> https://github.com/ichik
Hi all,
I am trying to get validation working for my application but I am
getting some weirdness. I have setup a custom RBAC implementation
using MongoDB and Ichikaway's datasource.
https://github.com/ichikaway/mongoDB-Datasource
I am working on validating in the Groups Model. This is my validate
One more time?
On Dec 12, 8:07 am, RhythmicDevil wrote:
> Bump!
>
> On Dec 10, 1:54 pm, RhythmicDevil wrote:
>
>
>
>
>
>
>
> > I have been going around and around with this this morning trying to
> > sort out the correct syntax for an $or containing m
Hi Geoff, thanks for the reply. Was trying to deny access to a
particular user/group to a controller. I had originally setup my
AppController::beforeFilter like you have shown. But when a user/group
tried to access a controller they did not have permission for they
were allowed access. If I run the
Bump!
On Dec 10, 1:54 pm, RhythmicDevil wrote:
> I have been going around and around with this this morning trying to
> sort out the correct syntax for an $or containing multiple $regex
>
> So in RockMongo I use this:
>
> {
> "$or" : [
> {
I have been going around and around with this this morning trying to
sort out the correct syntax for an $or containing multiple $regex
So in RockMongo I use this:
{
"$or" : [
{"ingredient" : {"$regex" : /^aru/i}},
{"ingredient" : {"$regex" : /^bro/i}},
]
}
It returns two
What do you do with a user or group that does not have access to a
node? I thought that an ARO would get denied access to an ACO
automatically if the permissions had been set. When my
AppController::beforeFilter() executes I see that the ACL component is
aware that my user is allowed to see the req
h->autoRedirect = false;
>
> Then add the code in your users->login method to populate the Auth.User
> session key and then redirect accordingly.
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 9 Dec 2011, at 18:44:50, RhythmicDevil wrote
It allows you to
> perform logic after login but before redirect - perfect for what you need.
>
> http://book.cakephp.org/view/1265/AuthComponent-Variables#autoRedirec...
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 9 Dec 2011,
Hi,
I have Users and Groups. When a user logs in I want the group name to
be part of the record that is stored in Session. Currently I get this:
array (
'id' => '4',
'username' => 'swright',
'group_id' => '4',
'created' => '2011-12-05 11:36:30',
'modified' => '2011-12-05 11:36:
reign_key'
=> $this->Session->read('Auth.User.group_id')), $this->name, '*'))
{
var_dump('Allowed');
}
else
{
var_dump('Not Allowed');
}
}
On Dec 9, 10:11 am, RhythmicDevil
Hi all, I am working on implementing RBAC using ACL. I am really close
but I am getting an error and I am hoping you can shed some light on
it. I have pasted my entire ACO and ARO trees below for reference.
When I run the following using the Cake console it works as expected:
[swright@swright-dev
Thats great Geoff thank you.
On Dec 7, 5:08 pm, Geoff Douglas wrote:
> I think you have most elements i place... I think the thing that is getting
> confusing is how cake is suppose to load the classes.
>
> So here's the kicker. Cake only "loads" models if they are related to
> something that you
Well the basic idea is that the application uses two datasources. One
is the MySQL one the other is a custom one I wrote for our API. The
Models that use the custom datasource require some methods and
properties, I posted those in the initial question on this thread.
Normally I would just put those
somehow stepping around the
framework. I always try to do things in the Cake way if at all
possible.
On Dec 7, 9:22 am, AD7six wrote:
> On Dec 7, 3:11 pm, RhythmicDevil wrote:
>
> > No actually. I created the file and class structure as shown above. I
> > get an error from PH
t this
AppModel->SubClass->AnotherSubClass
If I am wrong about this please tell me where I am going wrong. Please
see my example above.
Thank you.
On Dec 7, 8:55 am, AD7six wrote:
> On Dec 7, 1:55 pm, RhythmicDevil wrote:
>
> > Guess I was right about sub classing with Cake.
Guess I was right about sub classing with Cake.
On Dec 6, 9:34 am, RhythmicDevil wrote:
> Ok so I tried extending the AppModel class to a third level sub class
> but Cake fails to find it. Perhaps you can clue me in to where I am
> going wrong.
>
> I have the following
for the login method.
> Technically the login method needs to be publicly accessible. So, the
> line you have commented out that says:
> //$this->Auth->allow(array('*'));
>
> needs to say
> $this->Auth->allow(array('login'));
>
> This will allow
Ok so it seems that this might be the culprit:
$this->Auth->authorize = 'actions';
If I comment out that line I dont get the redirect loop.
On Dec 6, 11:21 am, RhythmicDevil wrote:
> I followed the instructions
> here:http://book.cakephp.org/view/1543/Simple-Acl-contr
I followed the instructions here:
http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application
to learn how to setup ACL and Auth. My two test attempts went smoothly
and worked as expected. However, now that I am trying it for real its
failing. I get stuck in this redirect loop and I dont u
y has trouble when trying to merge properties in one class
> with the AppClass. This should only be a problem with the
> AppController since you aren't defining many properties in AppModel.
>
> On Dec 5, 12:34 pm, RhythmicDevil wrote:
>
>
>
>
>
>
>
> >
Miles J wrote:
> Are you referring to where the files go?
>
> You can do anything in Cake that PHP allows, so extend as many times
> as you please.
>
> On Dec 5, 11:54 am, RhythmicDevil wrote:
>
>
>
>
>
>
>
> > Hi Miles,
> > thanks for the respon
n functionality. Cake IS PHP, so you can do
> whatever you want with classes.
>
> class User extends DbBaseModel {}
> class News extends ApiBaseModel {}
>
> -Miles
>
> On Dec 5, 11:29 am, RhythmicDevil wrote:
>
>
>
>
>
>
>
> > My application has
My application has two datasources. I use one to talk to MySQL for
ACL. The other is a custom datasource that talks an API my company is
developing. There are about 15 models that use the custom datasource
and will probably be more. For each of those models I need to share
methods and properties b
.
On Nov 16, 9:49 am, AD7six wrote:
> On Wednesday, 16 November 2011 15:24:14 UTC+1, RhythmicDevil wrote:
>
> > I am writing a custom datasource. I was implementing the delete action
> > in the datasource and ran into a problem. I expected that when I call
> > Model::dele
(), $values = array())
read($model, $queryData = array())
update($model, $fields = array(), $values = array())
delete($model, $id = null)
On Nov 16, 9:29 am, RhythmicDevil wrote:
> For reference here is my Datasource file.
>
>
> App::uses('HttpSocket',
to an Array
$data[$this->model->name] = (Array)
json_decode($results['body']);
return $data;
}
else
{
// @TODO Where is error data supposed to go in the Model?
$model->data = json_decode($results);
ret
I am writing a custom datasource. I was implementing the delete action
in the datasource and ran into a problem. I expected that when I call
Model::delete($id, false); it would execute the Datasource::delete()
method. But that does not happen. First a method called calculate() is
executed and then
I got it working finally. This is what I ended up with:
database.php
public $gti = array(
'datasource' => 'GtiSource',
'url' => 'http://swright-dev:1337/'
);
Model
public $useDbConfig = 'gti';
Datasource
filename: GtiSource.php
class : GtiSource
Although the filename:
So I was using the wrong model method. I was using Model::read()
instead of Model::find(). Read did not throw an error. But Find()
does.
Now I get this: Datasource class gti could not be found.
On Nov 15, 10:26 am, RhythmicDevil wrote:
> Hi All,
> I am having some issues understandi
Hi All,
I am having some issues understanding the naming conventions for a
custom datasource.
datasource file name: gti_api_source.php
class name GtiApiSource
Database Config
var $gti_api = array(
'driver' => 'gti_api',
'url' => 'http://swright-dev:1337/',
What drove the decision to change the naming conventions?
On Nov 13, 8:28 pm, José Lorenzo wrote:
> The CakePHP core team is proud to announce the immediate availability of
> CakePHP 2.0.3 [1]. A lot has happened in the PHP world since our last
> release, this new version incorporates all needed
PHP: 5.3.5
Cake: 1.3.7
MySQL: 5.1.47
So if I understand it right the PHP mysql driver that cake uses does
not support the password hashes in MySQL, If this is true, what is the
proper solution given that I have a shared host and cannot enable
short passwords or user the old_passwords() function?
Hi,
I have an application that uses SoapSource for one of its datasources.
The Web Service that I am using only defines one method:
sendTransaction. The data set that is sent to this method includes an
element called TransactionCommand that contains a string that
represents the actual command I wan
Hi,
I am using a SOAP web service as my datasource. The data that the
model fetches from the web service is a complex object (nested arrays
and objects). I want to map this returned data to an object that my
app will use internally. There a couple of reasons for this:
1. If the names of fields in
Thank you.
On Jul 16, 10:02 am, cricket wrote:
> On Fri, Jul 16, 2010 at 9:59 AM, RhythmicDevil
> wrote:
> > Ok I get you, that makes more sense. I will look into implementing
> > that.
>
> The more I think about it, the more I want to try it. I might take a
> swi
Ok I get you, that makes more sense. I will look into implementing
that.
On Jul 16, 9:56 am, cricket wrote:
> On Fri, Jul 16, 2010 at 9:37 AM, RhythmicDevil
> wrote:
> > Thanks for the reply.
>
> > The number of channels is variable but always more than a 100.
>
> &g
Cake to do it, is to use Memcache.
On Jul 16, 9:21 am, cricket wrote:
> On Fri, Jul 16, 2010 at 8:44 AM, RhythmicDevil
> wrote:
> > Hello,
> > I have a view that shows a television schedule, similar to DirectTVs
> > (http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a
Hello,
I have a view that shows a television schedule, similar to DirectTVs
(http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a list of
channels and programs in a 4 hour slice broken into 1/2 hour columns.
When the schedule first loads the start time is is the most recent 1/2
hour mark. Meani
Guess this must be impossible.
On Feb 5, 3:33 pm, RhythmicDevil wrote:
> Hi,
> having some problems understanding how to create an association
> between two existing records. The scenario is the following. I have
> recipes and menus. When viewing a recipe I want the user to be able t
Hi,
having some problems understanding how to create an association
between two existing records. The scenario is the following. I have
recipes and menus. When viewing a recipe I want the user to be able to
select a menu from a list to add the recipe to. (Menus contain
Recipes). So once again, the
hem to somewhere else
> this way you put a spoke in your wheel
>
> so better returning everything and echoing it extactly where you want
> to have it.
> there is no overhead to this at all - quite the opposite actually
>
> greets
> mark
>
> On 12 Jan., 21:21, RhythmicDevi
Hi,
I did not want to type echo statements into my views so I took the
suggestion of the CakePHP docs and added the following function to my
app_helper:
public function output($string)
{
echo parent::output($string."\n");
}
And I use it like this:
create($options = array('action' =>
I am very confused. If I do the following:
mymethod();
$cl->no_method();
?>
The call to no_method() will throw an error. However when I am using
CakePHP this does not seem to be the case.
Please consider the following:
$api_resp = $this->API->AddWorkOrder($this->Session->read
('Subscriber.Subs
fy in the
> controller class. More
> info:http://book.cakephp.org/view/346/Caching-in-the-Controller
>
> I hope it can help you!
>
> 2009/11/24 RhythmicDevil
>
> > I am confused as to why the Session object is only available in the
> > Controller. Shouldn'
I am confused as to why the Session object is only available in the
Controller. Shouldn't it be the Model's responsibility to cache the
data?
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.c
I am having an issue setting data to Session. I have an array in
Session:
Devices.Staging
I want to add a device to the array using the device_id as a key. I
expect something similar to the following:
Devices.Staging.12345678901 = device
Devices.Staging.12345678902 = device
The problem is that
o the model constructor.
>
> http://api.cakephp.org/class/model#method-Model__construct
>
> -Mark
>
> On Sep 3, 11:00 am, RhythmicDevil wrote:
>
> > Hi,
> > I have an app. It has to get data from two different sources, a mysql
> > db and an XML API
Hi,
I have an app. It has to get data from two different sources, a mysql
db and an XML API
For the API model I want to be able to do the following:
TriadAPI - extends AppModel contains generic query and connection info
Subscriber - extends TriadAPI and contains subscriber specific queries
I am
Thanks Marcelo. I will do as you suggested.
On Aug 18, 6:38 pm, Marcelo Andrade wrote:
> On Tue, Aug 18, 2009 at 12:30 PM, RhythmicDevil
> wrote:
>
> >(..)
> > From what I have read I gather that I wrap all my strings in my views
> > with __(). Create language dire
Hello,
I am having some trouble understanding exactly how to use i18n. I have
tried a couple of different things and its basically working but I am
still really sketchy on the details and cannot seem to find a
definitive source on what exactly I am supposed to do.
Using CakePHP Console
>From wha
gt; * @access public
> */
>
> On Mon, Aug 17, 2009 at 3:52 PM, RhythmicDevil wrote:
>
>
>
> > Hi,
> > I am trying to understand how to get internationalization to work in
> > CakePHP. After reading the docs and searching around, looking at
> > Teknoid and so
ut
> * @access public
> */
>
> On Mon, Aug 17, 2009 at 3:52 PM, RhythmicDevil wrote:
>
>
>
> > Hi,
> > I am trying to understand how to get internationalization to work in
> > CakePHP. After reading the docs and searching around, looking at
> > Teknoid a
Ok problem solved is that my PHP was not compiled with gettext. So
thats done. The page loads but there is not message being displayed.
On Aug 17, 4:52 pm, RhythmicDevil wrote:
> Hi,
> I am trying to understand how to get internationalization to work in
> CakePHP. After reading the
Hi,
I am trying to understand how to get internationalization to work in
CakePHP. After reading the docs and searching around, looking at
Teknoid and some other place this is what I am left with.
CakePHP has a class I18n that handles the loading of the correct
string from a .po file based upon th
times user/group on Linux. Check this first. If you think that
> one of your models gives problems, check its filename to be strictly
> lowercase.
>
> On Aug 14, 2:11 am, RhythmicDevil wrote:
>
> > Hello,
> > I am developing an app using Cake on my XP box using Apache 2.2, My
Hello,
I am developing an app using Cake on my XP box using Apache 2.2, MySQL
and SOAP. The app runs just fine on my XP machine. However when I move
it to a Linux demo box all hell breaks loose. Whats making it really
hard to debug is that I am getting no error output. Not on the screen,
not in th
Hi,
I am using CakePHP for my application. I am in the process of adding
jQgrid and I am having a problem loading the language file. CakePHP
complains that there is no controller for it?! I have no idea why
though. I have verified that the files are all in the correct place. I
have moved the langu
ve
On Jun 29, 12:58 pm, Carlos Gonzalez Lavin
wrote:
> How about a little class hierarchy?
>
> Soap extends AppModel and Suscriber-Device extend Soap
>
> You put that in Soap's constructor and then just super() it in
> Suscriber-Device
>
> 2009/6/29 RhythmicDevil
>
Hi,
some of my application's models will use SOAP or MySQL. I am trying to
figure out where to put the common SOAP stuff.
User Model will use MySQL
Subscriber Model will use SOAP
Device Model will use SOAP
In my SOAP models I need to have this:
$api_config = Configure::read('API');
Had to remove the redirect for when the validation failed
On Jun 25, 2:38 pm, RhythmicDevil wrote:
> Hello,
> I am trying to figure out why myloginform fields are not showing
> errors. From what I have read if I used cake's built in form stuff and
> setup avalidationarray t
Hello,
I am trying to figure out why my login form fields are not showing
errors. From what I have read if I used cake's built in form stuff and
setup a validation array this should happen automatically if I call
validate on the model. If I dump the Model I can see that there are
errors in the val
Hi,
having a little problem with validation. I am not using a DB. I have
to auth against Web Services. I am currently just working on the login
page trying to get messages to the view when validation fails.
Here is the Model:
class User extends AppModel
{
var $useDbConfig = 'soap';
v
Solved this. The problem was that I had Configure::write('debug', 3);
so there was all sort of extra junk in the response. When I set it to
0 it works fine. Now I just to figure out how to get debug when I need
it without juggling the config file.
On Jun 10, 1:44 pm, RhythmicDe
nope not the Bosstones' song but my AJAX response.
I have a button on the page. Clicking the button invokes the following
jQuery function:
$('#refresh_sub').click(function()
{
console.log('Start');
// Add the content to the dialog
$.post("/subscribe
Hello,
I have a view.ctp for a Subscriber. I want to break up the view into
several smaller templates as there are tabs and all sort of stuff on
the view. However logically the small pieces dont belong in elements
as they are not used anywhere else. I want to put them in views/
subscribers and jus
Hi,
I am having a brain sprain. I have a controller Subscribers that has
two actions 'view' and 'add_device'. View is called from the index
page with a Subscriber ID and then shows all the Subscriber's details.
In the 'view' view there is a form to add a device. This form's action
points at 'subsc
Hi,
I have a set of views in my app that will not be using a database. The
data will be coming from an web method. I believe I still need to use
a model to stay within MVC. So I have my model set up like this with a
test method:
class Workorder extends AppModel
{
var $useTable = false;
68 matches
Mail list logo