Last change
on this file since 12817 was
9586,
checked in by fschoepp, 11 years ago
|
#1888:
- Billing Component may now be deactivated by setting the BillingEnabled flag within the OaaS service configuration.
- Added views for invoices and usage data.
- Changed appearance of the SaveOrder view.
|
File size:
679 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Web;
|
---|
5 | using System.Web.Mvc;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Services.Optimization.Web.Helpers {
|
---|
8 | public class BillingFilterActionAttribute : ActionFilterAttribute {
|
---|
9 | public override void OnActionExecuting(ActionExecutingContext filterContext) {
|
---|
10 | var values = filterContext.RequestContext.RouteData.Values;
|
---|
11 | var controller = values["controller"];
|
---|
12 |
|
---|
13 | if (!BillingComponent.Enabled) {
|
---|
14 | // don't allow access to controllers with this name
|
---|
15 | filterContext.Result = new HttpStatusCodeResult(404);
|
---|
16 | }
|
---|
17 | base.OnActionExecuting(filterContext);
|
---|
18 | }
|
---|
19 | }
|
---|
20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.