userNotifications.js revision 35d8f970e25366e2703f1dacbf8fe3f55b494be1
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * Copyright (c) 2011-2012 ForgeRock AS. All rights reserved.
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * The contents of this file are subject to the terms
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * of the Common Development and Distribution License
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * (the License). You may not use this file except in
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * compliance with the License.
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * You can obtain a copy of the License at
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * See the License for the specific language governing
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * permission and limitations under the License.
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * When distributing Covered Code, include this CDDL
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * Header Notice in each file and include the License file
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * If applicable, add the following below the CDDL Header,
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * with the fields enclosed by brackets [] replaced by
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * your own identifying information:
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * "Portions Copyrighted [year] [name of copyright owner]"
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * @author mbilski
4c0f084e476c05989eb702c500a763ef09ba044ejeff.schenk * Endpoint for managing user notifications
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster var userId = request.parent.security.userid.id, res = {};
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster if(request.parent.security.userid.component !== "internal/user") {
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster var ret = openidm.query("repo/ui/notification", params);
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster //TODO: get notification, check if it's user's; if yes, then delete notification
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster throw "Unsupported operation: " + request.method;