I had a similar Problem a few days ago and i solved it by extending the
isAuthorized Method of SecureScreen.

Example:

    protected boolean isAuthorized( RunData data )  throws Exception
    {
        boolean isAuthorized = false;
        AccessControlList acl = data.getACL();
        if (acl==null || ! acl.hasRole("turbine_root"))
        {
            data.setScreenTemplate(
            TurbineResources.getString("template.login"));
            isAuthorized = false;

                // Your Code .....
                this.getContext(data).put("info", getUserCount());

        }
        else if(acl.hasRole("turbine_root"))
        {
            isAuthorized = true;
        }
        return isAuthorized;
    }

        protected Object getUserCount()
                        throws Exception
        {
                Criteria crit = new Criteria();
                List v = BasePeer.executeQuery("select count(*) as usercnt from
turbine_user");
                return v.get(0);
        }
-----Urspr��ngliche Nachricht-----
Von: Jiang Ruihai [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 03:48
An: Turbine Users List
Betreff: How to print some thing on the default page?


Hi all,
In my newapp, the default or first page comes from login.vm.
If I want to read something from my DB and print them on the first page, how
could I do?

<<attachment: winmail.dat>>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to